System and method of providing a messaging engine for an enterprise javabeans enabled server to achieve container managed asynchronous functionality
Claim Score by NHIP
Abstract
An asynchronous communication system is provided that includes a client system configured to communicate with a messaging service, the messaging service configured to communicate with the client system, a messaging engine, and an EJB-enabled server configured to communicate with the messaging service. The messaging engine is configured to communicate with the client system, the EJB-enabled server, and the messaging service. The messaging engine includes a deployment tool configured to deploy enterprise beans and generate asynchronous implementations of the stubs, a messaging container configured to manage asynchronous functions, and a client library configured to communicate with the messaging container. A method of generating a stub is also provided that is capable of asynchronous communication which includes generating home and remote interfaces of an enterprise bean, generating asynchronous implementations of the home and remote interfaces, and generating a class that implements the methods to include messaging calls.

Term
Term ended
Projected expiry passed 23 March 2021, 5.5 years ago.
- Priority
- Filed
- Published
- Projected expiry
- Today
36 claims: 7 independent, 29 dependent
- 1An Enterprise JavaBeans architecture for providing asynchronous communication comprising:one or more messaging servers;a client system configured to communicate with the one or more messaging servers;and an Enterprise JavaBeans enabled server having a messaging engine that includes a messaging container configured to manage asynchronous functions, wherein the Enterprise JavaBeans enabled server is configured to communicate with the one or more messaging servers.
- 13A system for providing asynchronous communication comprising:a client device, a messaging server configured to communicate with the client device;and an Enterprise JavaBeans enabled server having a messaging engine, a plurality of containers, and a plurality of enterprise beans that reside in each of the plurality of containers, the messaging engine configured to communicate with the client device and the messaging service and configured to provide asynchronous communication between the client device and the Enterprise JavaBeans enabled server.
- 25A method of establishing asynchronous communication between a client system and an Enterprise JavaBeans enabled server using a messaging server, the method comprising:storing a method call in a client library related to the client system, transmitting the method call to a stub;transmitting the method call from the stub to the messaging server, listening via a messaging container located at the Enterprise JavaBeans enabled server for the method call;and transmitting the method call to an enterprise bean corresponding to the stub.
- 28A method of establishing synchronous communication between a client system and a plurality of enterprise beans in a messaging container, the method comprising:providing a home and remote interface for the plurality of enterprise beans;generating synchronous implementations corresponding to the home and remote interface for the plurality of enterprise beans;compiling the synchronous implementations corresponding to the home and remote interface for the plurality of enterprise beans;generating home and remote stub and skeleton sources;and distributing the stubs to the client system.
- 29A method of establishing asynchronous messaging between a client system and a plurality of enterprise beans in a messaging container, the method comprising:providing a home and remote interface for the plurality of enterprise beans;generating asynchronous interfaces and asynchronous stubs corresponding to the home and remote interface for the plurality of enterprise beans;and distributing the asynchronous stubs to the client system.
- 35Broadest claimClaim Score 85, broad(NHIP)A method of generating a stub that is capable of asynchronous communication, comprising:generating method signatures from home and remote interfaces of an enterprise bean;generating asynchronous interfaces of the home and remote interfaces;and generating a class that implements the method signatures to include messaging calls.
- 36A method of making an asynchronous call to an enterprise bean of a server, comprising:performing a lookup operation to obtain a reference to a home interface of the enterprise bean;adding a client-side listener to the reference to monitor response messages;making a method call on the reference;formatting a request message;enqueing the request message to a client-side messaging server;transmitting the request message from the client-side messaging server to a server-side messaging server;enabling a server-side listener to monitor the request message;dequeing the request message from the server-side messaging server;extracting information from the request message at the server;executing the method call on the enterprise bean;formatting a result of the method call to produce the response message;transmitting the response message to the client-side messaging server;receiving the response message by the client-side listener;and extracting information from the response message.
Independent claims7
68 paragraphs in 5 sections, as filed
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application claims priority from U.S. provisional patent applications Serial Nos. 60/193,003 and 60/193,007, both filed on Mar. 29, 2000, which are herein incorporated by reference for all purposes.
[0002] 1. FIELD OF THE INVENTION
[0003] The present invention relates generally to systems and methods of providing asynchronous and synchronous communications between a client system and an Enterprise JavaBeans (“EJB”) enabled server. More particularly, the present invention relates to systems and methods of providing a messaging engine to achieve container managed asynchronous functionality between the client system and the EJB-enabled server.
2. BACKGROUND OF THE INVENTION
[0004] The EJB architecture, developed by Sun Microsystems, Inc., is a standard component architecture for building distributed object-oriented applications in the Java programming language. A distributed object-oriented application is an application program in which parts of the application program are located in different physical locations. The EJB architecture allows application developers to build these distributed applications by combining components that are developed by using tools from multiple vendors. This architecture defines the contracts that enable these tools to develop and deploy components that can inter-operate at runtime.
[0005] The EJB architecture utilizes an EJB specification that defines the functions and operations of the components of the EJB architecture. Components are pre-developed modules of application code that run in an application server and that can be assembled into working application systems. The EJB specification provides a framework for the development and deployment of components. These components may be plugged into the EJB-enabled server to enhance the EJB-enabled server's functionality. For example, the components provided by one vendor can be easily integrated with the components provided by other vendors using the EJB specification.
[0006]FIG. 1 is a simplified block diagram of an EJB architecture <b>10</b> having a client system <b>12</b> and a server <b>14</b> and configured to perform synchronous communication. The server has a number of components including a number of containers <b>16</b> and a number of enterprise beans <b>18</b>. The server provides the system level services such as load balancing, scalability, and interaction with an application server (not shown). The server is an EJB-enabled server that is configured to host the containers.
[0007] Enterprise beans <b>18</b> are components of the EJB architecture that are developed once and then deployed on multiple EJB-enabled servers without recompilation or source code modification. Enterprise beans reside in the container <b>16</b>, encapsulate application logic, and contain logic functions that operate on data stored in the EJB-enabled server <b>14</b> and a database <b>20</b>.
[0008] The EJB architecture defines two types of enterprise beans <b>18</b>, session beans and entity beans. A key difference between session and entity beans is the fact that an entity bean has a persistent state while a session bean models interactions but does not have a persistent state. Entity beans are associated with objects and persistent records in some sort of database (Resource Manager). In contrast, session beans do not represent database records but rather represent extensions of the client application and are responsible for managing processes or tasks. The client system <b>12</b> accesses the session bean through the session bean's remote interface. Each session bean is an EJB instance associated with a single client system and is typically non-persistent. An entity bean represents information persistently stored in the database <b>20</b> and is associated with database transactions. The persistence of entity beans is handled by the entity beans themselves or by the container <b>16</b>. The entity beans that represent a business object can be shared among multiple client systems <b>12</b>.
[0009] To implement a bean, two interfaces need to be defined:a home interface and a remote interface. The home interface defines the bean's life cycle methods including methods for creating new beans, removing beans and finding beans. The enterprise bean's home interface defines the methods for the client system <b>12</b> to create, remove, and locate EJB objects of the same type (i.e., they are implemented by the same enterprise bean). The client system can locate the enterprise bean's home interface through the Java Naming and Directory Interface (JNDI) API. The remote interface defines the enterprise bean's business methods callable by the client system, i.e., the methods a bean presents to the outside world to do its work. Each EJB object is accessible via the enterprise bean's remote interface.
[0010] Containers <b>16</b> reside in the server <b>14</b> and are responsible for managing the interactions between an enterprise bean <b>18</b> and its server. Each container is responsible for presenting a uniform interface between the enterprise bean and the server, creating new instances of the enterprise bean, and providing services such as concurrency, locking, persistence management, remote access, and security, to the enterprise beans. Multiple enterprise beans can be installed in and deployed from the same container. The container also creates a class that implements the home interface of the enterprise bean. The container is responsible for making the home interfaces of its deployed enterprise beans available to the client system <b>12</b> through JNDI.
[0011] In the EJB-enabled server <b>14</b>, the enterprise beans <b>18</b> are deployed into the containers <b>16</b>. The deployment process, illustrated in FIG. 2, begins when the container generates implementations of the home interface and the remote interface of the enterprise beans for use at runtime (step S-<b>1</b>). These implementations are then compiled to use remote method invocation (RMI) or any other such synchronous protocols as the protocol of communication with the EJB-enabled server (step S-<b>2</b>). The RMI protocol uses stubs and skeletons for communication between the client side and server side components. The skeletons <b>15</b> are generated classes that are located on the server side and stubs <b>13</b> are generated classes that are located on the client side (step S-<b>3</b>) (see also FIG. 3). Referring to FIG. 3, stubs <b>13</b> and skeletons <b>15</b> are responsible for making the method calls on the server appear as if they were running locally on the client system <b>12</b>. The stub <b>13</b> resides on the client system and is connected to the skeleton <b>15</b> via a network. The skeleton <b>15</b> is set up on a port at the EJB-enabled server side and listens for requests from the stub <b>13</b>. When an object makes a method call on any home or remote interface of a bean, the control transfers from the calling object to the called object's stub. When the client system <b>12</b> invokes the method on the stub <b>13</b>, the name of the method invoked and the values passed in as parameters are communicated to the skeleton <b>15</b>. For example, in FIG. 3, the method invokes a create routine. The skeleton parses the incoming stream to properly invoke the method and the result is streamed back to the stub.
[0012] The EJB specification also defines the client-view contract (or client contract) and component contract. The client-view contract is the contract between the client system <b>12</b> and a container <b>16</b> and provides a uniform development model for applications using enterprise beans <b>18</b> as components. The client view contract of the enterprise bean includes a home interface, remote interface, object identity, metadata interface, and handle. The component contract defines the contract between the enterprise bean and its container.
[0013] The EJB specification also defines various other aspects of the EJB architecture, e.g., the roles played by the various users and the runtime attributes of an enterprise bean called the Deployment Descriptor. In addition, the EJB specification supports various protocols including RMI and Internet Inter-Orb Protocol (IIOP). RMI is typically the default protocol that is supported by the EJB specification. RMI is the basis of distributed object systems and is responsible for making the distributed objects' location transparent, i.e., the object's location is unknown and unimportant to the client system <b>12</b>.
[0014] Using the RMI protocol, the EJB specification defines a synchronous mode of communication between the client system <b>12</b> and the server <b>14</b>. Synchronous communication means that when a request is made from one object to another, the calling object will be blocked until it obtains a response from the called object. For example, when the client system makes a request, e.g., a method call, to the server, the client system making the call is blocked for the duration of the call and until a response is received (see FIG. 1). That is, the client system will be blocked until the request is communicated to the server, the request is processed by the server, and a result is returned to the client system or an exception occurs. One drawback of synchronous communication is that the client system is unable to process further requests from the user application until and unless the server has completed the previous request. This strictly sequential processing may not be necessary or appropriate for a number of applications. For instance, if a client system is sending updates to a remote server and does not care about a reply from the server, and only expects the updates to reach the server reliably, a strictly synchronous behavior is not required and such applications are better served by an asynchronous model. In this case, the client system simply queues up updates, and as long as is guaranteed reliable delivery to the server, is free to process other requests before even hearing back from the server.
[0015] As a result of the problems associated with synchronous communication and the need for asynchronous communication in a distributed environment, EJB-enabled servers <b>14</b> have been developed which provide asynchronous capabilities. Current EJB-enabled servers achieve asynchronous capability at the application level by implementing an EJB-Java Messaging Service (JMS) bridge <b>19</b> on the EJB-enabled server <b>14</b> (see FIG. 4). One drawback of the EJB-JMS implementation is that the client system has to make JMS messaging calls that the EJB-enabled server understands and executes.
[0016] It should therefore be appreciated that there is a need for asynchronous communication protocols at the container level to create a reliable, scalable, and configurable messaging engine infrastructure where there is no loss of time or data due to non-availability of resources. Also, it should be appreciated that there is a need to extend the messaging capabilities to support asynchronous communications in a multi-tier distributed EJB environment where the programmer does not have to write any explicit messaging calls. The present invention fulfills these needs as well as others.
SUMMARY OF THE INVENTION
[0017] The present invention is directed to a system for providing asynchronous communication that includes a client system configured to communicate with a messaging service, the messaging service configured to communicate with the client system, a messaging engine, and an EJB-enabled server configured to communicate with the messaging service.
[0018] The messaging engine is a component of the EJB-enabled server and is configured to communicate with the client system, the EJB-enabled server, and the messaging service. The messaging engine includes a deployment tool configured to deploy enterprise beans and generate asynchronous implementations of the stubs, a messaging container configured to manage asynchronous functions at runtime, and a client library configured to communicate with the messaging container at runtime. The messaging engine provides for asynchronous communication between the client system and the EJB-enabled server, where the asynchronous functionality is managed at the container level.
[0019] The present invention is also directed to a method of generating a stub that is capable of asynchronous communication which includes generating home and remote interfaces of an enterprise bean, generating asynchronous implementations of the home and remote interfaces, and generating a class that implements the methods to include messaging calls. Also, the present invention is configured to generate stubs to handle the messaging calls on behalf of the programmer (bean developer).
[0020] Advantages of the present invention include providing synchronous communications, asynchronous communications or both simultaneously between the client system and the enterprise bean interfaces of the messaging container deployed in the EJB-enabled server. In addition, the bean does not need to be rewritten in order to invoke asynchronous communication. Also, the client system does not have to make messaging calls, or explicitly do marshalling and unmarshalling as in the case of JMS enabled EJB servers, thus simplifying client applications.
[0021] Since the EJB specification defines a server-side component architecture, where all remote method invocations made against a remote EJB object (entity or session beans) are inherently synchronous in nature as a result, the client gets blocked pending the completion of the remote method invocation. This time-dependent relationship between the programs being executed at the client and server systems may have certain negative implications with respect to client side responsiveness. This is because both programs have to be available to maintain the conversation; and one program waits, while the other is executed.
[0022] Asynchronous communication, with the use of the messaging server, i.e., messaging queues, provides a solution that overcomes the associated drawbacks of synchronous communication. Using the messaging queue mechanism, two communicating programs can run independently of each other in different locations— without having a logical connection between them.
[0023] The present invention provides a messaging engine that integrates asynchronous communication with EJB— to allow for asynchronous method invocations against EJB entity and session beans. In addition, the present invention provides for asynchronous communication in such a way that messaging calls are completely transparent to the client system.
[0024] Other features and advantages of the present invention should become apparent from the following description of the preferred embodiment, taken in conjunction with the accompanying drawings, which illustrate, by way of example, the principles of the present invention.
BRIEF DESCRIPTION OF THE DRAWINGS
[0025]FIG. 1 is a simplified block diagram of a prior art EJB architecture having a client system and an EJB-enabled server, all configured to communicate synchronously;
[0026]FIG. 2 is a simplified flow chart, of a prior art EJB architecture, illustrating the deployment process of enterprise beans into a container;
[0027]FIG. 3 is a simplified block diagram of a prior art EJB architecture having a client system and an EJB-enabled server and using stubs and skeletons to communicate synchronously;
[0028]FIG. 4 is a simplified block diagram of a prior art EJB architecture having a client system and an EJB-enabled server and configured to communicate asynchronously at the application level;
[0029]FIG. 5 is a simplified block diagram of an EJB architecture having a client system, an EJB-enabled server, and a messaging server configured to provide asynchronous messaging at the container level using a messaging engine;
[0030]FIG. 6 is a simplified flow chart illustrating the functions of the deployment tool during the deployment of enterprise beans into the EJB container to establish asynchronous messaging; and
[0031]FIG. 7 is a simplified block diagram illustrating the EJB architecture configured to facilitate asynchronous messaging between the client library, the messaging server, and the EJB-enabled server.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENT
[0032] In this section, the present invention is described in detail with regard to the drawing figures briefly described above.
[0033] With reference to FIG. 5, there is shown an EJB architecture <b>22</b> having a client system <b>24</b>, a messaging server (interchangeably referred to herein as messaging service) <b>26</b>, and an EJB-enabled server <b>28</b> having a messaging engine and configured to provide asynchronous messaging at the container level using the messaging engine. The client system includes a client library that is used to route messages from the client system to the messaging server and the EJB-enabled server. The client library may also be part of the messaging engine. The EJB architecture may be implemented using one or more client systems, messaging servers, and EJB-enabled servers.
[0034] The messaging server <b>26</b> provides guaranteed message delivery. Examples of messaging servers <b>26</b> include IBM's MQ server and Oracle's AQ server. The client system <b>24</b> accesses the bean through the messaging server <b>26</b> using a method call provided by the client library.
[0035] With reference to FIG. 7, to enable asynchronous communication, the client's method call is sent to a stub <b>31</b> and the stub <b>31</b> sends the call to the messaging server <b>26</b>. At the EJB-enabled server, listeners <b>34</b> at the messaging container <b>30</b> are listening for these incoming calls (in the form of messages). On receipt of the messages, the messaging container <b>30</b> picks up the messages and transfers the message to the proper enterprise bean <b>32</b>.
[0036] The Messaging Engine
[0037] The messaging engine might include the client library <b>35</b>, the messaging containers <b>30</b>, and a deployment tool <b>38</b>. As shown in FIG. 6 and further described below, the deployment tool of the messaging engine facilitates the generation of asynchronous stubs of the bean's home and remote interfaces and is also used to deploy the enterprise beans <b>32</b> into the messaging containers <b>30</b>. The deployment tool is typically a part of the EJB-enabled server <b>28</b> and may be implemented using hardware, software, or a combination of the two.
[0038] Deployment and Configuration
[0039]FIG. 6 is a simplified flow chart that illustrates the functions of the deployment tool <b>38</b> during the deployment of the enterprise beans <b>32</b> into the messaging containers <b>30</b> to establish asynchronous messaging. The process begins with configuration process when the deployment tool prompts the deployer to input the messaging server attributes like queue name, topic name, etc. The deployment tool then generates asynchronous and synchronous implementations corresponding to the home interface and remote interface of the enterprise beans (step B-<b>1</b>). The methods in asynchronous home and remote interfaces are designed to have long return values. These long return values are called the call identifications (CallIDs).
[0040] The following is an example of a bean's remote interface and the generation of a corresponding asynchronous interface during deployment and configuration of the EJB:
[0041] Actual Bean's Remote Interface: <tables id="TABLE-US-00001" num="1"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>import javax.ejb.*;</entry></row><row><entry>import java.rmi.*;</entry></row><row><entry>import java.util.*;</entry></row><row><entry>public interface StudentEntityCMPRemoteInterface extends</entry></row><row><entry>javax.ejb.EJBObject {</entry></row><row><entry>//All Business methods of Remote Interface</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String computeGrade() throws RemoteException;</entry></row><row><entry /><entry>public int getId() throws RemoteException;</entry></row><row><entry /><entry>public void setId(int id) throws RemoteException;</entry></row><row><entry /><entry>public String getName() throws RemoteException;</entry></row><row><entry /><entry>public int getMarks() throws RemoteException;</entry></row><row><entry /><entry>public void setName(String name) throws RemoteException;</entry></row><row><entry /><entry>public void setMarks(int marks) throws RemoteException;</entry></row><row><entry /><entry>public void swapRecords(int recordId) throws RemoteException;</entry></row><row><entry /><entry>public void removeAndUpdateRecord(int recordId) throws</entry></row><row><entry /><entry>RemoteException;</entry></row><row><entry /><entry>public void removeRecord(int recordId) throws RemoteException;</entry></row><row><entry /><entry>public void updateRecord(int recordId) throws RemoteException;</entry></row><row><entry /><entry>public String getCallerName() throws RemoteException;</entry></row><row><entry /><entry>public boolean getRollback() throws RemoteException;</entry></row><row><entry /><entry>public void setRollback() throws RemoteException;</entry></row><row><entry /><entry>public void createRecs() throws RemoteException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry>Corresponding generated asynchronous interface:</entry></row><row><entry>import java.util.*;</entry></row><row><entry>import java.rmi.*;</entry></row><row><entry>import java.security.*;</entry></row><row><entry>import vanda.generic.client.*;</entry></row><row><entry>import vanda.client.messaging.*;</entry></row><row><entry>import javax.ejb.*;</entry></row><row><entry>public interface AsyncStudentEntityCMPRemoteInterface</entry></row><row><entry>{</entry></row><row><entry>//All Business Methods ...</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public long getName() throws Java.rmi.RemoteException;</entry></row><row><entry /><entry>public long setName(java.lang.String param0) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>java.rmi.RemoteException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public long removeRecord(int param0) throws</entry></row><row><entry /><entry>java.rmi.RemoteException;</entry></row><row><entry /><entry>public long computeGrade() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long createRecs() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long getCallerName() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long getId() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long getMarks() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long getRollback() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long isCallerInRole(java.lang.Stringparam0) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>java.rmi.RemoteException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public long removeAndUpdateRecord(int param0) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>java.rmi.RemoteException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public long setId(int param0) throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long setMarks(int param0) throws</entry></row><row><entry /><entry>java.rmi.RemoteException;</entry></row><row><entry /><entry>public long setRollback() throws java.rmi.RemoteException;</entry></row><row><entry /><entry>public long swapRecords(int param0) throws</entry></row><row><entry /><entry>java.rmi.RemoteException;</entry></row><row><entry /><entry>public long updateRecord(int param0) throws</entry></row><row><entry /><entry>java.rmi.RemoteException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>// Other Utility methods given as a part of the client interface</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object getResult(long callId) throws Exception;</entry></row><row><entry /><entry>public boolean getStatus(long callId) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaResultAlreadyReceivedException ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>public void releaseMessagingService() ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>// all Other EJB Methods - Given an Async Look</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>public long getHandle() throws RemoteException;</entry></row><row><entry /><entry>public long remove() throws RemoteException;</entry></row><row><entry /><entry>public void addListener(VandaMessagingEventListener e) ;</entry></row><row><entry /><entry>public VandaMessagingStub getEJBHome();</entry></row><row><entry /><entry>public Object getPrimaryKey();</entry></row><row><entry /><entry>public boolean isIdentical(Object obj);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0042] The above code is an example of an asynchronous interface where the first few methods are business methods defined in the remote interface of the EJB. This interface also provides for asynchronous lookup for the EJB methods like getHandle, etc. Some more methods besides the ones mentioned above may also be seen in the interface, e.g., releaseMessagingService—a utility method which could be used by the client system for performing certain operations like disconnecting from a messaging service, etc. In the above interface all the business methods are made to return a long value which is the callID, this, as explained above, could be used for result processing.
[0043] Synchronous and Asynchronous Implementations and Asynchronous Stubs
[0044] The synchronous implementations are compiled using a Remote Method Invocation Compiler (RMIC) or a similar tool (step B-<b>2</b>). In other words, the synchronous bean implementations use RMI (or any RMI like synchronous protocol) as the protocol of communication with the EJB-enabled server <b>28</b>. In step B-<b>3</b>, the home and remote stub and skeleton sources are generated which are used for synchronous communications (step B-<b>3</b>).
[0045] For the asynchronous implementation, the bean's home and remote interfaces are used to generate asynchronous interfaces and asynchronous stubs. When the asynchronous stub is generated (step B-<b>5</b>), the information (such as parameters and their types, bean name, method name, object ID, etc.) needed to convert the messaging calls into messages corresponding to the EJB-enabled server <b>28</b> being used, is embedded into the asynchronous stub (see also FIG. 7). In step B-<b>4</b>, the stubs (both asynchronous and synchronous) are distributed to the client system. The asynchronous stubs are not dependent on the underlying messaging server <b>26</b>, that is, they use a generic interface to communicate with the messaging server <b>26</b>. Using the generated asynchronous stubs <b>31</b>, the messages are routed to the messaging server <b>26</b>. The asynchronous stubs combined with the client library provide a completely transparent method of asynchronous communication with the EJB-enabled server <b>28</b>.
[0046] The following code is an example of an asynchronous stub generated for the interface described above: <tables id="TABLE-US-00002" num="2"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>import java.lang.*;</entry></row><row><entry>import java.util.*;</entry></row><row><entry>import java.sql.*;</entry></row><row><entry>import java.rmi.*;</entry></row><row><entry>import java.security.*;</entry></row><row><entry>import java.io.*;</entry></row><row><entry>import javax.ejb.*;</entry></row><row><entry>import vanda.generic.client.*;</entry></row><row><entry>import vanda.client.messaging.*;</entry></row><row><entry>import vanda.generic.messaging.*;</entry></row><row><entry>import vanda.generic.container.core.*;</entry></row><row><entry>import vanda.generic.server.core.*;</entry></row><row><entry>public class AsyncVandaStudentEntityCMPRemoteInterfaceImpl_Stub</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>extends VandaMessagingStub</entry></row><row><entry /><entry>implements AsyncStudentEntityCMPRemoteInterface , Serializable</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public AsyncVandaStudentEntityCMPRemoteInterfaceImpl_Stub()</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>setClassName(“StudentEntityCMPRemoteInterface”);</entry></row><row><entry /><entry>setIsSession(false);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public long getName() throws java.rmi.RemoteException</entry></row><row><entry /><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingAPIInterface vandaAPI =</entry></row><row><entry /><entry>getVandaMessagingAPI()</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingArgument vandaMesgArgs ;</entry></row><row><entry /><entry>long methodCallId ;</entry></row><row><entry /><entry>vandaMesgArgs = new VandaMessagingArgument() ;</entry></row><row><entry /><entry>vandaMesgArgs.setClassName(“StudentEntityCMP</entry></row><row><entry /><entry>RemoteInterface”)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>vandaMesgArgs.setMethodName(“getName”) ;</entry></row><row><entry /><entry>if (VandaMessagingClient.isJavaClient() == false)</entry></row><row><entry /><entry>{</entry></row><row><entry /><entry>vandaMesgArgs.setSessionId(VandaMessaging</entry></row><row><entry /><entry>Client.getSessionId());</entry></row><row><entry /><entry>}</entry></row><row><entry /><entry>vandaMesgArgs.setCallId( methodCallId =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingClient.getCallId()) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>vandaMesgArgs.setSecurityId(getSecurityId()) ;</entry></row><row><entry /><entry>vandaMesgArgs.setTransactionContext(get</entry></row><row><entry /><entry>TransactionContext()) ;</entry></row><row><entry /><entry>vandaMesgArgs.setRemoteObjectId(getObjectId()) ;</entry></row><row><entry /><entry>vandaMesgArgs.setClientId(getClientId()) ;</entry></row><row><entry /><entry>vandaMesgArgs.setConsumerName(getConsumerName()) ;</entry></row><row><entry /><entry>vandaMesgArgs.setObjectType(</entry></row><row><entry /><entry>VandaMessagingObjectType.EJB_OBJECT) ;</entry></row><row><entry /><entry>vandaMesgArgs.setTargetMessagingDescriptor(</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="56PT" align="left" /><colspec colname="1" colwidth="161PT" align="left" /><tbody valign="top"><row><entry /><entry>getTargetMessagingDescriptor()) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>registerMethodCall(vandaMesgArgs);</entry></row><row><entry /><entry>invokeMethod(vandaMesgArgs, “StudentEntity CMP”);</entry></row><row><entry /><entry>return(methodCallId) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>.........</entry></row><row><entry>// Similarly as the above method all other methods are also implemented</entry></row><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0047] In the above code, the stub layer does not contain any direct messaging calls, it uses a messaging object for putting messages into and getting messages from the messaging service <b>26</b>. This is referred to as a plug-in implementation or plug-in module. Each method above builds a Messaging Argument object that contains details about the bean, the method to be called on that bean, parameters, their types, etc. This object would be used at the server side to call the correct method. After building this object the request object is registered with the client library for event notification.
[0048] After the object is built, the stub calls invokeMethod which performs one or both of the following:
[0049] 1. Enqueue the message into the messaging server using the plug in module; or
[0050] 2. Call the method directly if client is another bean and the target bean is also available at the same server.
[0051] In the above code the asynchronous stub inherits a class called VandaMessagingStub which contains all the services required for the generated stubs, but these services are transparent to the client system.
[0052] Messaging Listeners
[0053] In reference to FIG. 7, a server thread runs for each messaging server <b>26</b> configuration. Once the enterprise bean <b>32</b> is configured with the messaging server <b>26</b> attributes, a server side thread is started which is referred to as the messaging listener <b>34</b>. Each messaging listener <b>34</b> is a listener thread which listens for messages from the messaging server <b>26</b>. The messaging listeners <b>34</b> are responsible for getting the messages at the server side. This eliminates the need for skeletons, as implemented in RMI. The listeners <b>34</b> are generic listeners which are not dependent on the underlying messaging server <b>26</b>. However, to receive messages from the messaging server <b>26</b>, the messaging listener <b>34</b> uses a plug in module which is dependent on the underlying messaging server <b>26</b>. Once the messaging listener <b>34</b> gets a message it delegates the message to the messaging container <b>30</b> so that it may execute the request and give back the response.
[0054] The following is an example of a generic interface that would be implemented to develop plug in modules which are messaging server <b>26</b> dependent. Generic listeners would use an implementation of the below interface for putting messages in and getting messages from the messaging server. <tables id="TABLE-US-00003" num="3"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>package vanda.generic.messaging;</entry></row><row><entry>import vanda.server.core.*;</entry></row><row><entry>public interface VandaMessagingAPIInterface</entry></row><row><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void setMessagingDescriptor</entry></row><row><entry /><entry>(VandaMessagingDescriptorInterface</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>mesgDesc) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public VandaMessagingDescripiorInterface</entry></row><row><entry /><entry>getMessagingDescriptor() ;</entry></row><row><entry /><entry>public void setproxyMessagingDescriptor(</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaProxyMessagingDescriptorInterface mesgDesc) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public VandaProxyMessagingDescriptorInterface</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="70PT" align="left" /><colspec colname="1" colwidth="147PT" align="left" /><tbody valign="top"><row><entry /><entry>getProxyMessagingDescriptor() ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public boolean isClientProxy() ;</entry></row><row><entry /><entry>public void enqueue (Object data) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaMessagingEnqueueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void enqueue (Object data, String consumerName)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throws VandaMessagingEnqueueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object dequeue()</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throws VandaMessagingDequeueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object dequeue (String consumerName)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throws VandaMessagingDequeueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object dequeueNoWait()</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throws VandaMessagingDequeueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object dequeueNoWait(String consumerName)</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throws VandaMessagingDequeueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void enqueue (Object data, String consumerName,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingDescriptorInterface mesgDesc)</entry></row><row><entry /><entry>throws VandaMessagingEnqueueException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public Object browse() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void setSendTimeout(int timeout) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void setReceiveTimeout(int timeout) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public boolean isMessageTimeoutSupported ();</entry></row><row><entry /><entry>public boolean isReceiveTimeoutSupported ();</entry></row><row><entry /><entry>public boolean isBrowseSupported ();</entry></row><row><entry /><entry>public int getSendTimeout() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public int getReceive Timeout() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void releaseMessagingService();</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0055] The code above references an object called Messaging Descriptor, which is a generic object that contains details about the messaging server <b>26</b>. Details like topic name, queue name, etc. could be stored into this object. This object is kept opaque at the listener level for purposes of generality, but are interpreted at the messaging service <b>26</b> plug in. The following is the generic interface structure that would be implemented to create a Messaging Descriptor: <tables id="TABLE-US-00004" num="4"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>public interface VandaMessagingDescriptorInterface extends Serializable</entry></row><row><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void setQueueName(String queueName) ;</entry></row><row><entry /><entry>public void setPortNumber(int port) ;</entry></row><row><entry /><entry>public void setQueueManagerName(String queueManagerName) ;</entry></row><row><entry /><entry>public void setChannelName(String Channel) ;</entry></row><row><entry /><entry>public void setUserID(String uid) ;</entry></row><row><entry /><entry>public void setPassword(String pwd) ;</entry></row><row><entry /><entry>public void setHostName(String host) ;</entry></row><row><entry /><entry>public void setConsumerName(String consumer) ;</entry></row><row><entry /><entry>public void setSubnetAddress(String subnet) ;</entry></row><row><entry /><entry>public void setDBURL(String dbURL) ;</entry></row><row><entry /><entry>public void setTopicName(String topicName) ;</entry></row><row><entry /><entry>public void setAPIName(String apiName) ;</entry></row><row><entry /><entry>public void setTopicFlag(boolean flag) ;</entry></row><row><entry /><entry>public void setMesgServerAddress(String address) ;</entry></row><row><entry /><entry>public void setProxyFlag(boolean flag) ;</entry></row><row><entry /><entry>public String get QueueName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public int getPortNumber() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getQueueManagerName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getChannelName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getHostName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getUserID() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getPassword() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getConsumerName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getSubnetAddress() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getDBURL() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getAPIName() ;</entry></row><row><entry /><entry>public String get TopicName() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public String getMesgServerAddress() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingOperationNotAllowedException;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public boolean isTopic() ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0056] The following code is a sample implementation of the plug in module using JMS messaging calls and publish subscribe method for communication. This abstraction layer is written for each messaging server <b>26</b> supported by the messaging engine and hides proprietary APIs from the messaging engine. <tables id="TABLE-US-00005" num="5"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>public class VandaMessagingJMSImplementation</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>implements VandaMessagingAPIInterface {</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>............</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>public void setMessagingDescriptor</entry></row><row><entry /><entry>(VandaMessagingDescriptorInterface</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>mesgDesc) {</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>mesgDescriptor = mesgDesc;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="56PT" align="left" /><colspec colname="1" colwidth="161PT" align="left" /><tbody valign="top"><row><entry /><entry>topicConnectionFactory =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="42PT" align="left" /><colspec colname="1" colwidth="175PT" align="left" /><tbody valign="top"><row><entry /><entry>new com.sun.messaging.TopicConnection</entry></row><row><entry /><entry>Factory(jmsAddress,</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="56PT" align="left" /><colspec colname="1" colwidth="161PT" align="left" /><tbody valign="top"><row><entry /><entry>mesgDescriptor.getPortNumbe());</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>topicConnection =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>topicConnectionFactory.createTopicConnection(mesgDescriptor.</entry></row><row><entry>getUserID(), mesgDescriptor.getPassword());</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>topicConnection.start();</entry></row><row><entry /><entry>topicSessionEnqueue = topicConnection.createTopicSession</entry></row><row><entry /><entry>(false, 1);</entry></row><row><entry /><entry>topicSessionDequeue = topicConnection.createTopicSession</entry></row><row><entry /><entry>(false, 1);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public VandaMessagingDescriptorInterface</entry></row><row><entry /><entry>getMessagingDescriptor (){</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>return mesgDescriptor;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public void enqueue (Object data) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaMessagingEnqueueException{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>String topicName ;</entry></row><row><entry /><entry>String consumerName ;</entry></row><row><entry /><entry>consumerName = mesgDescriptor.getConsumerName() ;</entry></row><row><entry /><entry>topicName = mesgDescriptor.getTopicName() ;</entry></row><row><entry /><entry>topic = topicSessionEnqueue.createTopic(topicName);</entry></row><row><entry /><entry>topicPublisher = topicSessionEnqueue.createPublisher(topic);</entry></row><row><entry /><entry>objMessage = topicSessionEnqueue.createObjectMessage();</entry></row><row><entry /><entry>enqueueflag=true;</entry></row><row><entry /><entry>objMessage.setObject((Serializable)data);</entry></row><row><entry /><entry>objMessage.setStringProperty</entry></row><row><entry /><entry>(“ConsumerName”,consumerName);</entry></row><row><entry /><entry>topicPublisher.publish(objMessage);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>/**</entry></row><row><entry /><entry>*enqueue(Object data ,String consumerName) puts the Message</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>Object into the messaging service with the</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>*details got from the messaging descriptor and the consumerName.</entry></row><row><entry /><entry>*/</entry></row><row><entry /><entry>public void enqueue (Object data, String consumerName) throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaMessagingEnqueueException{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>String topicName ;</entry></row><row><entry /><entry>topicName = mesgDescriptor.getTopicName() ;</entry></row><row><entry /><entry>topic = topicSessionEnqueue.createTopic(topicName);</entry></row><row><entry /><entry>topicPublisher = topicSessionEnqueue.createPublisher(topic);</entry></row><row><entry /><entry>objMessage = topicSessionEnqueue.createObjectMessage();</entry></row><row><entry /><entry>enqueueflag=true;</entry></row><row><entry /><entry>objMessage.setObject((Serializable)data);</entry></row><row><entry /><entry>objMessage.setStringProperty</entry></row><row><entry /><entry>(“ConsumerName”,consumerName);</entry></row><row><entry /><entry>topicPublisher.publish(objMessage);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public Object dequeue() throws</entry></row><row><entry /><entry>VandaMessagingDequeueException{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>String topicName ;</entry></row><row><entry /><entry>String consumerName ;</entry></row><row><entry /><entry>topicName = mesgDescriptor.getTopicName() ;</entry></row><row><entry /><entry>consumerName = mesgDescriptor.getConsumerName() ;</entry></row><row><entry /><entry>topic = topicSessionDequeue.createTopic(topicName);</entry></row><row><entry /><entry>topicSubscriber =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>topicSessionDequeue.createSubscriber(topic,“ConsumerName = ′′′+</entry></row><row><entry>consumerName +′′′′′false);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>ObjectMessage objMessage =</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>(ObjectMessage)topicSubscriber.receive();</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>return objMessage.getObject();</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public Object browse() throws</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>VandaMessagingOperationNotAllowedException {</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>throw new</entry></row><row><entry /><entry>VandaMessagingOperationNotAllowedException(“G003”);</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public boolean isMessageTimeoutSupported (){</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>return false</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public boolean isReceiveTimeoutSupported (){</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>return false;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public boolean isBrowseSupported (){</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>return false;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>public void releaseMessagingService(){</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="28PT" align="left" /><colspec colname="1" colwidth="189PT" align="left" /><tbody valign="top"><row><entry /><entry>topicPublisher.close();</entry></row><row><entry /><entry>topicSubscriber.close();</entry></row><row><entry /><entry>topicSessionEnqueue.close();</entry></row><row><entry /><entry>topicSessionDequeue.close();</entry></row><row><entry /><entry>topicConnection.close();</entry></row><row><entry /><entry>topicConnectionFactory = null;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>}</entry></row><row><entry /><entry>......................</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="3"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="84PT" align="left" /><colspec colname="2" colwidth="119PT" align="left" /><tbody valign="top"><row><entry /><entry>TopicConnectionFactory</entry><entry>topicConnectionFactory;</entry></row><row><entry /><entry>TopicConnection</entry><entry> topicConnection;</entry></row><row><entry /><entry>TopicSession</entry><entry>topicSession;</entry></row><row><entry /><entry>TopicPublisher</entry><entry> topicPublisher;</entry></row><row><entry /><entry>TopicSubscriber</entry><entry> topicSubscriber;</entry></row><row><entry /><entry>Topic</entry><entry> topic ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>VandaMessagingDescriptorInterface mesgDescriptor;</entry></row><row><entry /><entry>................</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0057] Client side Messaging Listeners
[0058] Apart from listeners <b>34</b> on the server side, the client system <b>24</b> also needs to run some threads for listening for response messages from the server <b>28</b>, these threads are referred to as client messaging listeners <b>36</b>. These are also generic listeners like the server side messaging listeners <b>34</b> since they do not depend on the underlying messaging server <b>26</b>. Once a response comes from the server then the response message is taken and the client is notified using an Event Listener mechanism, further described below.
[0059] Response Notification
[0060] The client system <b>24</b> can install event listeners so that the client system <b>24</b> can be notified when responses for the request messages arrive. To do this, the client application should implement VandaMessagingEventListener class provided along with the client library <b>35</b>. This event listener class has methods for result notification and exception notification.
[0061] The following is an example of the signature of the method that would be called when the result arrives:
[0062] public void methodCompleted(VandaMessagingEvent e);
[0063] The following is an example of a method signature for exception processing:
[0064] public void exceptionOccured(VandaMessagingEvent e);
[0065] The VandaMessagingEventListener interface is shown below: <tables id="TABLE-US-00006" num="6"><table frame="none" colsep="0" rowsep="0"><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><thead><row><entry /></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></thead><tbody valign="top"><row><entry>public interface VandaMessagingEventListener extends EventListener</entry></row><row><entry>{</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="2"><colspec colname="OFFSET" colwidth="14PT" align="left" /><colspec colname="1" colwidth="203PT" align="left" /><tbody valign="top"><row><entry /><entry>public void methodCompleted( VandaMessagingEvent e ) ;</entry></row><row><entry /><entry>public void exceptionOccured( VandaMessagingEvent e ) ;</entry></row></tbody></tgroup><tgroup align="left" colsep="0" rowsep="0" cols="1"><colspec colname="1" colwidth="217PT" align="left" /><tbody valign="top"><row><entry>}</entry></row><row><entry namest="1" nameend="1" align="center" rowsep="1" /></row></tbody></tgroup></table></tables>
[0066] To begin, the client system <b>24</b> makes a lookup method call to the JNDI for a particular enterprise bean. The call includes the name of the enterprise bean in the lookup argument of the JNDI to get a reference of the home interface. With the lookup call, the client system <b>24</b> also passes a parameter identifying whether it is the asynchronous reference of the home interface that is desired. If no parameter is passed, the default communication is synchronous communication. Otherwise, if asynchronous communication is desired, the parameter passed in this example is “vms”. If asynchronous communication is desired, the lookup would give an instantiated asynchronous stub to the client system. Once the asynchronous stub reference is retrieved, the client system <b>24</b> can make method calls, which are converted to messages and transferred to the EJB-enabled server <b>28</b> using messaging calls. Each method call corresponds to an operation requested by the client system <b>24</b>. The method call includes the name of the method to be invoked and the parameters, and is transferred to the EJB-enabled server using messaging calls. The client system <b>24</b> does not make any explicit method calls directly to the EJB-enabled server.
[0067] Configuring the EJB architecture as shown in the figures and performing the above described operations, the client system <b>24</b> and the messaging containers <b>30</b> allow the enterprise bean <b>32</b> to be completely transparent to the client system <b>24</b>. The present invention provides for container-managed asynchronous capabilities, as opposed to application-level asynchronous capabilities, that eliminates the need for explicit messaging calls.
[0068] The foregoing detailed description of the present invention is provided for the purposes of illustration and is not intended to be exhaustive or to limit the invention to the precise embodiment disclosed. Accordingly, the scope of the present invention is defined by the following claims.
Contents5
8 sheets
Sheet 1 Sheet 2 Sheet 3 Sheet 4 Sheet 5 Sheet 6 Sheet 7 Sheet 8
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US7702791B2 | Cited by | United States of America | Applicant |
| US2006271814A1 | Cited by | United States of America | Pre-grant |
| US2003204641A1 | Cited by | United States of America | Pre-grant |
| US2007147306A1 | Cited by | United States of America | Pre-grant |
| US6996830B1 | Cited by | United States of America | Search report |
| US2008313293A1 | Cited by | United States of America | Pre-grant |
| US2006004959A1 | Cited by | United States of America | Pre-grant |
| US2008097997A1 | Cited by | United States of America | Pre-grant |
| US7703077B2 | Cited by | United States of America | Search report |
| US2003014480A1 | Cited by | United States of America | Pre-grant |
| US7380155B2 | Cited by | United States of America | Applicant |
| US7774776B2 | Cited by | United States of America | Search report |
| US2005114835A1 | Cited by | United States of America | Pre-grant |
| US2003014554A1 | Cited by | United States of America | Pre-grant |
| US7248603B1 | Cited by | United States of America | Applicant |
| US7392317B2 | Cited by | United States of America | Search report |
| US2003018732A1 | Cited by | United States of America | Pre-grant |
| US7797669B1 | Cited by | United States of America | Applicant |
| US2007136393A1 | Cited by | United States of America | Pre-grant |
| US2006020446A1 | Cited by | United States of America | Pre-grant |
| US7620842B2 | Cited by | United States of America | Applicant |
| US7895153B2 | Cited by | United States of America | Applicant |
| US7403996B2 | Cited by | United States of America | Applicant |
| US2005262101A1 | Cited by | United States of America | Pre-grant |
| US7467166B2 | Cited by | United States of America | Applicant |
| US2007192320A1 | Cited by | United States of America | Pre-grant |
| US7694003B2 | Cited by | United States of America | Applicant |
| US2003046230A1 | Cited by | United States of America | Pre-grant |
| US2010077378A1 | Cited by | United States of America | Pre-grant |
| US7249193B1 | Cited by | United States of America | Search report |
| US7793309B2 | Cited by | United States of America | Search report |
| US8176014B2 | Cited by | United States of America | Applicant |
| US2008091683A1 | Cited by | United States of America | Pre-grant |
| US2008140844A1 | Cited by | United States of America | Pre-grant |
| US2006123066A1 | Cited by | United States of America | Pre-grant |
| US7406618B2 | Cited by | United States of America | Applicant |
| US2004255300A1 | Cited by | United States of America | Pre-grant |
| US2014244764A1 | Cited by | United States of America | Pre-grant |
| US7328322B2 | Cited by | United States of America | Applicant |
| US2008059951A1 | Cited by | United States of America | Pre-grant |
| US2007192334A1 | Cited by | United States of America | Pre-grant |
| US7676791B2 | Cited by | United States of America | Search report |
| US7409420B2 | Cited by | United States of America | Applicant |
| US2005192993A1 | Cited by | United States of America | Pre-grant |
| US2004220609A1 | Cited by | United States of America | Pre-grant |
| US2003023898A1 | Cited by | United States of America | Pre-grant |
| US6915519B2 | Cited by | United States of America | Search report |
| US7660824B2 | Cited by | United States of America | Applicant |
| US2003014526A1 | Cited by | United States of America | Pre-grant |
| US2006123199A1 | Cited by | United States of America | Pre-grant |
| US7280558B1 | Cited by | United States of America | Search report |
| US7444333B2 | Cited by | United States of America | Applicant |
| US7571215B2 | Cited by | United States of America | Applicant |
| US2006015881A1 | Cited by | United States of America | Pre-grant |
| US2003163761A1 | Cited by | United States of America | Pre-grant |
| US7300123B2 | Cited by | United States of America | Search report |
| US2006129872A1 | Cited by | United States of America | Pre-grant |
| US7305658B1 | Cited by | United States of America | Applicant |
| US7343606B2 | Cited by | United States of America | Search report |
| US6226689B1 | Cites | United States of America | Pre-grant |
| US6253252B1 | Cites | United States of America | Pre-grant |
13 members in 3 offices
Priority claims10
| Document | Office | Kind | Date |
|---|---|---|---|
| 19300300 | United States of America | P | |
| 19300300 | United States of America | P | |
| 19300700 | United States of America | P | |
| 19300700 | United States of America | P | |
| 81699901 | United States of America | A | |
| 60193003 | – | – | – |
| 60193007 | – | – | – |
| US20000193003P | – | – | – |
| US20000193007P | – | – | – |
| US20010816999 | – | – | – |
Members13
| Document | Office | Kind | |
|---|---|---|---|
| WO0173547A2 | World Intellectual Property Organization (WIPO) | A2 | |
| WO0173550A2 | World Intellectual Property Organization (WIPO) | A2 | |
| WO0173551A2 | World Intellectual Property Organization (WIPO) | A2 | |
| AU4597601A | Australia | A | |
| AU4940201A | Australia | A | |
| AU4942401A | Australia | A | |
| US2002004848A1 | United States of America | A1 | |
| US2002004850A1 | United States of America | A1 | |
| US2002004856A1 | United States of America | A1 | |
| WO0173547A3 | World Intellectual Property Organization (WIPO) | A3 | |
| WO0173551A3 | World Intellectual Property Organization (WIPO) | A3 | |
| WO0173550A3 | World Intellectual Property Organization (WIPO) | A3 | |
| US2004205771A1 | United States of America | A1 |
19 transactions on the USPTO file
Abandoned after 1 non-final rejection.
- Non-final rejections
- 1
- Final rejections
- 0
- RCEs
- 0
- Appeals
- 0
Over time
Point at a mark for the transactionTransactions
| Event | |
|---|---|
| Mail Abandonment for Failure to Respond to Office ActionAbandoned | |
| Aband. for Failure to Respond to O. A. | |
| Mail Non-Final RejectionNon-final rejection | |
| Non-Final RejectionNon-final rejection | |
| Case Docketed to Examiner in GAU | |
| Case Docketed to Examiner in GAU | |
| Case Docketed to Examiner in GAU | |
| Case Docketed to Examiner in GAU | |
| Information Disclosure Statement (IDS) Filed | |
| Information Disclosure Statement (IDS) Filed | |
| Case Docketed to Examiner in GAU | |
| Information Disclosure Statement (IDS) Filed | |
| Information Disclosure Statement (IDS) Filed | |
| Information Disclosure Statement (IDS) Filed | |
| Information Disclosure Statement (IDS) Filed | |
| Application Dispatched from OIPE | |
| Correspondence Address Change | |
| IFW Scan & PACR Auto Security Review | |
| Initial Exam Team nn |
6 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Information on status: application discontinuationABANDONED -- FAILURE TO RESPOND TO AN OFFICE ACTIONSTCB | STCB | |
| AssignmentAS | AS | |
| AssignmentAS | AS | |
| AssignmentAS | AS | |
| AssignmentAS | AS | |
| AssignmentAS | AS |
Numbers
- Publication, DOCDB
- 2002004850
- Publication, EPODOC
- US2002004850
- Application
- 9816999
- Application, DOCDB
- 81699901
- Application, EPODOC
- US20010816999
Titles
- English
- System and method of providing a messaging engine for an enterprise javabeans enabled server to achieve container managed asynchronous functionality
Classification
- CPC, 5
- G06F9/546
- G06F8/30
- G06F9/465
- G06F9/541
- G06F9/548
- IPC, 5
- G06F9 00
- G06F9 44
- G06F9 46
- G06F9 54
- G06F15 163
- USPC, 2
- 719313000
- 709203000