Getting Started with Sun Java System RFID

Getting Started with Sun Java System RFID

un Java System RFID Software is an RFID infrastructure framework that integrates data and RFID-enabled devices into enterprise application systems ranging from small projects to large deployments. Java System RFID Software can be used to build systems that facilitate asset tracking, enforce policy compliance, detect tampering, and prevent crime.

Sun Java System RFID Software v3.0
The Java System RFID Software is a standards-based RFID Middleware framework from Sun that, among other things, gathers and filters information from RFID readers; exchanges this information as XML messages; stores the information to relational databases; and manages RFID devices, events, and components.

The Sun Java System RFID Software consists of four modules:

  1. RFID Event Manager is an event processing framework that manages data coming from all readers in the network.
  2. RFID Configuration Manager is a GUI application you use to specify the set of devices connected to the RFID Event Manager.
  3. RFID Management Console is a Web-based application used to modify various read and write attributes of the RFID Event Manager.
  4. RFID Information Server is a J2EE application that facilitates capturing and querying EPC-related data (see the sidebar “Electronic Product Code“) and provides interfaces for back-end systems.

The Sun Java System RFID Event Manager
The RFID Event Manager framework is a Jini-based event processing framework that facilitates the capture, filtering, and storage of Electronic Product Code (EPC) events generated by RFID devices. The Jini services of the RFID Event Manager framework are managed through Rio, an open source container of a component model called Jini Service Beans (JSBs).

The RFID Event Manager consists of a management application called “Control Station” and one or more workload handlers called “Execution Agents.” Execution Agents register with the Control Station application, which uses them to gather and filter RFID information. Each Execution Agent provides one or more specialized Web services called “reader services.” A reader service communicates with the RFID device, processes the information according to a configuration object, and communicates an event client.

The Sun Java System RFID Configuration Manager
The RFID Configuration Manager is a GUI application that is used define the set of devices that will be managed by the RFID Event Manager, how device information is processed within the RFID Event Manager, and where the information is to be sent once it has been processed.

The RFID Configuration Manager uses a chain of subclasses of com.sun.autoid.ems.AbstractComponent called a “Configuration Object” to identify a device to be managed by the RFID Event Manager and the software services that will be used to process the device information.

There are several subclasses of AbstractComponent that you should understand:

  • Adapters begin the event chain by receiving information from the device and sending information to the device. Received information is packaged inside an event object, which is posted to listeners that are registered with the adapter.
  • Filters are used in the middle of the event chain to remove noise, such as excessive read events, or to manipulate event objects received from an adapter. Filters post event objects to connectors.
  • Connectors (also called loggers) reside at the end of the event chain to collect and augment data for back-end processes or listeners (also called consumers). A back-end process might be the RFID Information Server or a third-party software application.
 
Figure 1: Sun RFID Component Relationships: The figure illustrates the Sun RFID Software module relationships and event flow.

Configuration Object components generate events to communicate with each other. Every component is an event producer and every component can register itself with other components to consume their events.

The Sun Java System RFID Information Server
The RFID Information Server is a J2EE application that captures and queries EPC-related, low-level data and translates it into higher-level business data.

RFID Information Server is typically deployed on a different machine than the RFID Event Manager. The RFID Information Server is built on Jini 2.0, Project Rio 3.1, and the Sun Java System Application Server 8.1.

The Sun Java System RFID Management Console
The Sun Java System RFID Management Console is a Web based application that is used to modify attributes of the RFID Event Manager components and to monitor and manage the status of devices that are connected to the RFID Event Manager.

The diagram in Figure 1 illustrates the relationships between components of the Sun Java System RFID framework.

Obtaining Sun Java System RFID

  1. Download the RFID Software.
  2. Unzip the software to the directory of your choice.
  3. Change to the directory containing the unzipped download file.
  4. Change to the rfidem directory and double-click setup.bat to start the RFID Event Manager installer. The Welcome panel appears.
  5. From the “Welcome” panel, click “Next” and follow the instructions on the panels to perform the installation.
  6. On the “Select Type of Installation” panel, select the “Typical” installation option, and click “Next.”
  7. On the “Select Java Home Location” panel, confirm that the installation selected the top level of the path to your J2SE installation.
  8. On the “Station Location and Group Configuration” panel, type the name or IP address of the host system and a unique Jini group name. The group name must be unique for every control station you set up. The group name gives the control station its identity over the network. The installer defaults the group name to AutoID-hostname. Note that if you are performing this installation in a DHCP environment (such as a laptop), type localhost for the IP address.
  9. When the installation completes, click “Close.”

Running Sun Java System RFID
Starting the RFID Configuration Manager on UNIX

  • Make sure you have superuser or administrator privileges
  • Start the RFID Configuration Manager by executing the rfidconfig script.
    • On Solaris: /opt/SUNWrfid/bin/rfidconfig
    • On Linux: /opt/sun/rfidem/bin/rfidconfig

Starting the RFID Configuration Manager on Microsoft Windows

  • From the Start Menu: Choose Start?> Programs?> Sun Microsystems?> Sun Java System RFID Software?> Configuration Manager.
  • From a command window: Enter C:Program FilesSunRFID Software
    fidemin
    fidconfig.bat

Handling Application-level Events with ALE
Sun Java System RFID offers an abstraction of Application-level Events (ALE) defined by the EPCglobal specification in the com.sun.autoid.ale.AleAPI interface. Classes implementing this interface (you’ll find it in sun-alesvc-common.jar) embody support for handling Application-level Events.

The EPCglobal Application-level Events (ALE) specification (also known as collection and filtering), is a Web service specification with a WSDL file that defines operations to define, configure, and request reports. It also defines an XML schema for reports and report requests.

Sun provides a default implementation of the AleAPI interface in the com.sun.autoid.ale.client.ALEClient class, installed when you select the ALE custom option during installation of the RFID Event Manager. You will find this class in the /rfidem/lib/sun-rfid-common.jar file, where SUN_RFID_HOME is the directory where you installed Sun Java System RFID.

The ALEClient class constantly searches for all readers on the system and maintains an up-to-date list of physical and logical names. The code you’ll see below illustrates how to use the ALEClient class to support the ALE specification.

The Sun Java RFID Software implements an ALE Web service using Java API for XML-based RPC (JAX-RPC). This service acts as an intermediary to a Jini RMI service contained within the RFID Event Manager. Requests and messages sent to this Web service are referred to as “report requests” and “report messages” respectively, and are implemented as Plain old Java objects (POJOs).

The ALE Web service supports three basic modes of interaction with clients: subscription, polling predefined ECSpecs, and polling a new ECSpec.

The following line of code connects to the ALE service specified by the ENDPOINT_ADDRESS parameter:

   ALEClient aleClient = new ALEClient(ENDPOINT_ADDRESS);

The ALE API defines two configuration objects: an Event Cycle Specification (ECSpec) and a Report Specification (ECReportSpec). When interacting with the ALE Web service, you must provide it with an ECSpec (a “define”) that describes an event cycle (the smallest unit of interaction between the ALE Web service and a client) by specifying the boundary (when to start and stop collecting data), the logical readers from which to receive data, and one or more ECReportSpecs. The system collects data during an event cycle. After an event cycle boundary has completed, the system groups and filters the data, and then generates reports.

   private static ECSpec defineECSpec(String specStr,      ALEClient aleClient, String ecSpecName)   {      ECSpec ecSpec = null;         try      {         ecSpec = xmlUtil.getSPEC(specStr);         aleClient.define(ecSpecName, ecSpec);         System.out.println("Define of ECSpec: "            + ecSpecName + " succeeded");      }      catch (Exception e)      {         System.out.println("Define of ECSpec: "            + ecSpecName + " failed");         System.err.println(e.getMessage());      }         return ecSpec;   }      private static void undefineECSpec(ALEClient aleClient,      String ecSpecName)   {      try      {         aleClient.undefine(ecSpecName);         System.out.println("Undefine succeeded");      }      catch (Exception e)      {         System.err.println("ECSpec undefine failed");         System.err.println(e.getMessage());      }   }

The Subscribe mode of interaction requires the ECSpec to be defined ahead of time. Then a client adds a subscription to the ECSpec with which the ALE Web services communicates.

   private static void subscribeECSpec(ALEClient aleClient,      String ecSpecName, String outputFilePath)   {      try      {         aleClient.subscribe(ecSpecName, outputFilePath);         System.out.println("ECSpec: " + ecSpecName            + " subscribe Succeeded");      }      catch (Exception e)      {         System.err.println("ECSpec: " + ecSpecName            + " subscribe failed");         System.err.println(e.getMessage());      }   }      private static void unsubscribeECSpec(ALEClient aleClient,      String ecSpecName, String outputFilePath)   {      try      {         aleClient.unsubscribe(ecSpecName, outputFilePath);         System.out.println("ECSpec: " + ecSpecName            + " unsubscribe succeeded");      }      catch (Exception e)      {         System.err.println("ECSpec: " + ecSpecName             + " unsubscribe failed");         System.err.println(e.getMessage());         }      }

The Immediate mode of interaction demands that the ECSpec must be processed and fulfilled immediately, for example, when the ECSpecs first event cycle boundary completes.

   private static ECReports executeSpecImmediately(      String specStr, ALEClient aleClient)   {      ECReports reports = null;         try      {         ECSpec ecSpec = xmlUtil.getSPEC(specStr);         reports = aleClient.immediate(ecSpec);      }      catch (Exception e)      {         System.err.println("Execute failed");         System.err.println(e.getMessage());      }         return reports;   }

The Poll mode of interaction is similar to Immediate, except that the ECSpec is defined on the server beforehand and given a name, letting clients request data from it using the name rather than continually resending the ECSpec.

   private static ECReports pollForReports(      ALEClient aleClient, String ecSpecName)   {      try      {         return aleClient.poll(ecSpecName);      }      catch (Exception e)      {         System.err.println("Poll reports failed");         System.err.println(e.getMessage());      }         return null;   }

You can retrieve ancillary data and reports from the ALE Web service, as the following methods illustrate.

   private static List retrieveSubscribers(ALEClient aleClient,      String ecSpecName)   {      List subscribers = null;         try      {         subscribers = aleClient.getSubscribers(ecSpecName);      }      catch (Exception e)      {         System.err.println("ECSpec: " + ecSpecName            + " subscribers retrieval failed");         System.err.println(e.getMessage());      }         return subscribers;   }      private static ECSpec retrieveSpec(ALEClient aleClient,      String ecSpecName)   {      ECSpec ecSpec = null;         try      {         ecSpec = aleClient.getECSpec(ecSpecName);      }      catch (Exception e)      {         System.err.println("ECSpec retrieval for "            + ecSpecName + " failed");         System.err.println(e.getMessage());      }         return ecSpec;   }      private static List getSpecNames(ALEClient aleClient)   {      try      {         List specNames = aleClient.getECSpecNames();         return specNames;      }      catch (Exception e)      {         System.err.println("SpecNames fetch failed");         System.err.println(e.getMessage());      }         return new ArrayList();   }      private static String getVendorVersion(ALEClient aleClient)   {      try      {         return aleClient.getVendorVersion();      }      catch (Exception e)      {         System.err.println("VendorVersion failed");         System.err.println(e.getMessage());      }         return "";   }      private static String getStandardVersion(ALEClient aleClient)   {      try      {         return aleClient.getStandardVersion();      }      catch (Exception e)      {         System.err.println("StandardVersion failed");         System.err.println(e.getMessage());      }         return "";   }

Sample ECSpec Schema Implementation
The following listing illustrates a sample of a static ECSpec that could be sent to the ALE Web service in a “define” interaction.

                        PMLReader                           2000         1000                                                                     

As you can see, much of the developer work involves configuration and (rightfully) determining actions to take when RFID events occur. Otherwise, Sun Java System RFID Software provides an RFID infrastructure framework for integrating data and RFID-enabled devices. The framework acts as middleware to bridge the gap between RFID devices and enterprise application systems. You can capitalize on the Sun Java System RFID Software system to build applications that can, among other things, facilitate asset tracking, enforce policy compliance, detect tampering, and prevent crime.

devx-admin

devx-admin

Share the Post:
Clean Energy Adoption

Inside Michigan’s Clean Energy Revolution

Democratic state legislators in Michigan continue to discuss and debate clean energy legislation in the hopes of establishing a comprehensive clean energy strategy for the

Chips Act Revolution

European Chips Act: What is it?

In response to the intensifying worldwide technology competition, Europe has unveiled the long-awaited European Chips Act. This daring legislative proposal aims to fortify Europe’s semiconductor

Revolutionized Low-Code

You Should Use Low-Code Platforms for Apps

As the demand for rapid software development increases, low-code platforms have emerged as a popular choice among developers for their ability to build applications with

Global Layoffs

Tech Layoffs Are Getting Worse Globally

Since the start of 2023, the global technology sector has experienced a significant rise in layoffs, with over 236,000 workers being let go by 1,019

Clean Energy Adoption

Inside Michigan’s Clean Energy Revolution

Democratic state legislators in Michigan continue to discuss and debate clean energy legislation in the hopes of establishing a comprehensive clean energy strategy for the state. A Senate committee meeting

Chips Act Revolution

European Chips Act: What is it?

In response to the intensifying worldwide technology competition, Europe has unveiled the long-awaited European Chips Act. This daring legislative proposal aims to fortify Europe’s semiconductor supply chain and enhance its

Revolutionized Low-Code

You Should Use Low-Code Platforms for Apps

As the demand for rapid software development increases, low-code platforms have emerged as a popular choice among developers for their ability to build applications with minimal coding. These platforms not

Cybersecurity Strategy

Five Powerful Strategies to Bolster Your Cybersecurity

In today’s increasingly digital landscape, businesses of all sizes must prioritize cyber security measures to defend against potential dangers. Cyber security professionals suggest five simple technological strategies to help companies

Global Layoffs

Tech Layoffs Are Getting Worse Globally

Since the start of 2023, the global technology sector has experienced a significant rise in layoffs, with over 236,000 workers being let go by 1,019 tech firms, as per data

Huawei Electric Dazzle

Huawei Dazzles with Electric Vehicles and Wireless Earbuds

During a prominent unveiling event, Huawei, the Chinese telecommunications powerhouse, kept quiet about its enigmatic new 5G phone and alleged cutting-edge chip development. Instead, Huawei astounded the audience by presenting

Cybersecurity Banking Revolution

Digital Banking Needs Cybersecurity

The banking, financial, and insurance (BFSI) sectors are pioneers in digital transformation, using web applications and application programming interfaces (APIs) to provide seamless services to customers around the world. Rising

FinTech Leadership

Terry Clune’s Fintech Empire

Over the past 30 years, Terry Clune has built a remarkable business empire, with CluneTech at the helm. The CEO and Founder has successfully created eight fintech firms, attracting renowned

The Role Of AI Within A Web Design Agency?

In the digital age, the role of Artificial Intelligence (AI) in web design is rapidly evolving, transitioning from a futuristic concept to practical tools used in design, coding, content writing

Generative AI Revolution

Is Generative AI the Next Internet?

The increasing demand for Generative AI models has led to a surge in its adoption across diverse sectors, with healthcare, automotive, and financial services being among the top beneficiaries. These

Microsoft Laptop

The New Surface Laptop Studio 2 Is Nuts

The Surface Laptop Studio 2 is a dynamic and robust all-in-one laptop designed for creators and professionals alike. It features a 14.4″ touchscreen and a cutting-edge design that is over

5G Innovations

GPU-Accelerated 5G in Japan

NTT DOCOMO, a global telecommunications giant, is set to break new ground in the industry as it prepares to launch a GPU-accelerated 5G network in Japan. This innovative approach will

AI Ethics

AI Journalism: Balancing Integrity and Innovation

An op-ed, produced using Microsoft’s Bing Chat AI software, recently appeared in the St. Louis Post-Dispatch, discussing the potential concerns surrounding the employment of artificial intelligence (AI) in journalism. These

Savings Extravaganza

Big Deal Days Extravaganza

The highly awaited Big Deal Days event for October 2023 is nearly here, scheduled for the 10th and 11th. Similar to the previous year, this autumn sale has already created

Cisco Splunk Deal

Cisco Splunk Deal Sparks Tech Acquisition Frenzy

Cisco’s recent massive purchase of Splunk, an AI-powered cybersecurity firm, for $28 billion signals a potential boost in tech deals after a year of subdued mergers and acquisitions in the

Iran Drone Expansion

Iran’s Jet-Propelled Drone Reshapes Power Balance

Iran has recently unveiled a jet-propelled variant of its Shahed series drone, marking a significant advancement in the nation’s drone technology. The new drone is poised to reshape the regional

Solar Geoengineering

Did the Overshoot Commission Shoot Down Geoengineering?

The Overshoot Commission has recently released a comprehensive report that discusses the controversial topic of Solar Geoengineering, also known as Solar Radiation Modification (SRM). The Commission’s primary objective is to

Remote Learning

Revolutionizing Remote Learning for Success

School districts are preparing to reveal a substantial technological upgrade designed to significantly improve remote learning experiences for both educators and students amid the ongoing pandemic. This major investment, which

Revolutionary SABERS Transforming

SABERS Batteries Transforming Industries

Scientists John Connell and Yi Lin from NASA’s Solid-state Architecture Batteries for Enhanced Rechargeability and Safety (SABERS) project are working on experimental solid-state battery packs that could dramatically change the

Build a Website

How Much Does It Cost to Build a Website?

Are you wondering how much it costs to build a website? The approximated cost is based on several factors, including which add-ons and platforms you choose. For example, a self-hosted

Battery Investments

Battery Startups Attract Billion-Dollar Investments

In recent times, battery startups have experienced a significant boost in investments, with three businesses obtaining over $1 billion in funding within the last month. French company Verkor amassed $2.1

Copilot Revolution

Microsoft Copilot: A Suit of AI Features

Microsoft’s latest offering, Microsoft Copilot, aims to revolutionize the way we interact with technology. By integrating various AI capabilities, this all-in-one tool provides users with an improved experience that not

AI Girlfriend Craze

AI Girlfriend Craze Threatens Relationships

The surge in virtual AI girlfriends’ popularity is playing a role in the escalating issue of loneliness among young males, and this could have serious repercussions for America’s future. A

AIOps Innovations

Senser is Changing AIOps

Senser, an AIOps platform based in Tel Aviv, has introduced its groundbreaking AI-powered observability solution to support developers and operations teams in promptly pinpointing the root causes of service disruptions