The instant disclosure relates to an application server. More specifically, the disclosure relates to an application server for mobile applications with inbound and outbound communications.
Application servers executing computer code have conventionally connected to an information server to push information to the information server. For example, an application server may push information from a computer program executing on the application server to the information server. Conventional application servers only have outbound communications to the information server. Thus, the application server is unable to receive requests for computer programs executing on the application server from the information server.
According to one embodiment, a method includes listening on a network port for a network connection request from an information server. The method also includes establishing a socket connection with the information server after the network connection request is received. The method further includes receiving a request message through the socket connection. The method also includes identifying a session bean to respond to the request message. The method further includes sending a response message to the information server.
According to another embodiment, an application server includes an enterprise container for performing operations requested by an information server. The application server also includes a resource adapter for processing an inbound connection from and an outbound connection to the information server.
According to yet another embodiment, a computer program product includes a computer-readable medium having code to listen on a network port for a network connection request from an information server. The medium also includes code to establish a socket connection with the information server after the network connection request is received. The medium further includes code to receive a request message through the socket connection. The medium also includes code to identify a session bean to respond to the request message. The medium further includes code to send a response message to the information server.
The foregoing has outlined rather broadly the features and technical advantages of the present invention in order that the detailed description of the invention that follows may be better understood. Additional features and advantages of the invention will be described hereinafter which form the subject of the claims of the invention. It should be appreciated by those skilled in the art that the conception and specific embodiment disclosed may be readily utilized as a basis for modifying or designing other structures for carrying out the same purposes of the present invention. It should also be realized by those skilled in the art that such equivalent constructions do not depart from the spirit and scope of the invention as set forth in the appended claims. The novel features which are believed to be characteristic of the invention, both as to its organization and method of operation, together with further objects and advantages will be better understood from the following description when considered in connection with the accompanying figures. It is to be expressly understood, however, that each of the figures is provided for the purpose of illustration and description only and is not intended as a definition of the limits of the present invention.
For a more complete understanding of the disclosed system and methods, reference is now made to the following descriptions taken in conjunction with the accompanying drawings.
In one embodiment, the user interface device 110 is referred to broadly and is intended to encompass a suitable processor-based device such as a desktop computer, a laptop computer, a personal digital assistant (PDA) or table computer, a smartphone or other a mobile communication device or organizer device having access to the network 108. In a further embodiment, the user interface device 110 may access the Internet or other wide area or local area network to access a web application or web service hosted by the server 102 and provide a user interface for enabling a user to enter or receive information.
The network 108 may facilitate communications of data between the server 102 and the user interface device 110. The network 108 may include any type of communications network including, but not limited to, a direct PC-to-PC connection, a local area network (LAN), a wide area network (WAN), a modem-to-modem connection, the Internet, a combination of the above, or any other communications network now known or later developed within the networking arts which permits two or more computers to communicate, one with another.
In one embodiment, the server 102 is configured to execute session beans in a container. Additionally, session beans on the server 102 may access data stored in the data storage device 106 via a Storage Area Network (SAN) connection, a LAN, a data bus, or the like. The data storage device 106 may include a hard disk, including hard disks arranged in an Redundant Array of Independent Disks (RAID) array, a tape storage drive comprising a magnetic tape data storage device, an optical storage device, or the like. The data may be arranged in a database and accessible through Structured Query Language (SQL) queries, or other data base query languages or operations.
In one embodiment, the server 102 may submit a query to selected data from the storage devices 204, 206. The server 102 may store consolidated data sets in a consolidated data storage device 210. In such an embodiment, the server 102 may refer back to the consolidated data storage device 210 to obtain a set of data elements at the request of a session bean. Alternatively, the server 102 may query each of the data storage devices 204, 206, 208 independently or in a distributed query to obtain the set of data elements. In another alternative embodiment, multiple databases may be stored on a single consolidated data storage device 210.
In various embodiments, the server 102 may communicate with the data storage devices 204, 206, 208 over the data-bus 202. The data-bus 202 may comprise a SAN, a LAN, or the like. The communication infrastructure may include Ethernet, Fibre-Chanel Arbitrated Loop (FC-AL), Small Computer System Interface (SCSI), Serial Advanced Technology Attachment (SATA), Advanced Technology Attachment (ATA), and/or other similar data communication schemes associated with data storage and communication. For example, the server 102 may communicate indirectly with the data storage devices 204, 206, 208, 210; the server 102 first communicating with a storage server or the storage controller 104.
The server 102 may include modules for interfacing with the data storage devices 204, 206, 208, 210, interfacing a network 108, interfacing with a user through the user interface device 110, and the like. In a further embodiment, the server 102 may host an engine, application plug-in, or application programming interface (API).
The computer system 300 also may include random access memory (RAM) 308, which may be SRAM, DRAM, SDRAM, or the like. The computer system 300 may utilize RAM 308 to store the various data structures used by a software application having code to execute session beans in a container. The computer system 300 may also include read only memory (ROM) 306 which may be PROM, EPROM, EEPROM, optical storage, or the like. The ROM may store configuration information for booting the computer system 300. The RAM 308 and the ROM 306 hold user and system data.
The computer system 300 may also include an input/output (I/O) adapter 310, a communications adapter 314, a user interface adapter 316, and a display adapter 322. The I/O adapter 310 and/or the user interface adapter 316 may, in certain embodiments, enable a user to interact with the computer system 300. In a further embodiment, the display adapter 322 may display a graphical user interface associated with a software or web-based application. For example, the display adapter 322 may display menus allowing an administrator to change configuration settings on the server 102 through the user interface adapter 316.
The I/O adapter 310 may connect one or more storage devices 312, such as one or more of a hard drive, a compact disk (CD) drive, a floppy disk drive, and a tape drive, to the computer system 300. The communications adapter 314 may be adapted to couple the computer system 300 to the network 108, which may be one or more of a LAN, WAN, and/or the Internet. The user interface adapter 316 couples user input devices, such as a keyboard 320 and a pointing device 318, to the computer system 300. The display adapter 322 may be driven by the CPU 302 to control the display on the display device 324.
The applications of the present disclosure are not limited to the architecture of computer system 300. Rather the computer system 300 is provided as an example of one type of computing device that may be adapted to perform the functions of a server 102 and/or the user interface device 110. For example, any suitable processor-based device may be utilized including without limitation, including personal data assistants (PDAs), tablet computers, smartphones, computer game consoles, and multi-processor servers. Moreover, the systems and methods of the present disclosure may be implemented on application specific integrated circuits (ASIC), very large scale integrated (VLSI) circuits, or other circuitry. In fact, persons of ordinary skill in the art may utilize any number of suitable structures capable of executing logical operations according to the described embodiments.
According to one embodiment, the resource adapter 422 may be a system-level software driver used by the container 424 to connect to an enterprise information server. The resource adapter 422 may be available as a library and used within the address space of a server or client. The resource adapter 422 may plug in to the container 424 to allow the session beans 426, 428 deployed in the container 424 to use the client application programming interface (API) and/or tool-generated high-level abstractions to access the information server 410.
The resource adapter 422 may be configurable by an administrator of the application server 420. For example, the administrator may configure a CharacterSet configuration to specify the character set of string values passed between the application server 420 and the information server 410. According to one embodiment the CharacterSet defaults to ISO8859-1. The CharacterSet may be configurable on the outbound communication connection 430 and/or the inbound communication connection 432. In another example, the administrator may configure a ClientLoginImplClass configuration to specify the name of a ClientLogin class used by the resource adapter 422 to perform user authentication such as a client login. In yet another example, the network port for listening to requests may be configured by an administrator through a ListenerPort setting on the application server. Additionally, the administrator may configure a MessageBacklog configuration to define the number of incoming connection requests that may be waiting at the application server 420. In another example, the administrator may configure a ProviderURL configuration to define the universal resource locator (URL) to locate a naming service.
The session beans 426, 428 may be created by a remote client (not shown) and exist for the duration of a single client-server session. The session bean 426, 428 performs operations, such as calculations or database access, for the remote client. Although the session beans 426, 428 may be transactional, they may or may not be recoverable if the application server 420 fails. The session beans 426, 428 may be stateless or may maintain conversational state across methods and transactions. If the session beans 426, 428 maintain states then the container 424 manages this state if the session beans 426, 428 are removed from memory. Although only two session beans are illustrated in
One method of handling request messages received at the resource adapter 422 is discussed with reference to
At block 504 when a network connection request is received, the resource adapter establishes a socket connection with the information server. A worker thread may execute on the resource adapter to process requests from the information server coupled to the resource adapter through the socket connection. The worker thread may remain active until the socket connection is closed by the information server.
At block 506 a request message is received by the resource adapter through the socket connection. The request message may be decoded by the resource adapter. The request message may include a header having the overall message length, a validation identifier, a message version, and/or a task identifier. The header may also include other arguments for use by the requested task. The task identifier may identify the request message as a request to find a session bean, invoke a method, and/or release a session bean. According to one embodiment, a request message may have the header format listed in the table below.
In the event the request message is a find bean request message, the request message header may be followed by arguments for JNDI Name, Login Configuration Name, UserName, and Password. The Java naming and directory interface (JNDI) name argument may identify the JNDI name of the session bean to find. The Login Configuration Name argument may identify the Java authentication and authorization service (JAAS) configuration for use to authenticate the provided user name and password provided in the UserName and Password arguments, respectively.
In the event the request message is an invoke method request message, the request message header may be followed by arguments for Method Name and Method Arguments. The Method Name argument may be a string argument that defines the name of the session bean method to invoke. The Method Arguments arguments may be a series of zero or more arguments that match the signature of the specified method name.
In the event the request message is a release bean request message, the request message header may not be followed by any arguments.
At block 508 a session bean is identified on the application server to respond to the request message. While identifying a session bean, a session bean may be instantiated or created in the application server to respond to the request message. The session bean may perform calculations requested by the information server and/or access databases requested by the information server.
At block 510 a response message is sent from the resource adapter to the information server. The response message may include a header having an overall message length, a validation identifier, a message version, and a status. A status value of zero may indicate that the requested task completed successfully. A status value of one may indicate that an error has occurred in the requested task. If an error is detected, a string argument having a description of the error may be placed after the response header. If no error is detected, data produced by the requested task may follow the response header. According to one embodiment, a response message may have the header format listed in the table below.
As described above, one or more arguments may follow a request message and/or a response message. An argument descriptor format according to one embodiment is described in the table below.
Data types for an argument may include integers, floating numbers, strings, Boolean values, and/or other data types listed in the table below. According to one embodiment, the data type of an argument may be identified by placing an identifier in the dataType argument field according to the table below.
In the event the response message is a find bean response message the response message header may not be followed by any arguments.
In the event the response message is an invoke method response message, the response message header may be followed by at least one argument if the task completes successfully. According to one embodiment, the at least one argument may be one of the Data Type from 1-17 or 70 as illustrated in the table above. If the task completes with an error, a string argument may follow the invoke method response message header describing the error.
In the event the response message is a release bean response message the response message header may not be followed by any arguments. If an error occurred in the bean the response message may include an argument describing the error following the response message header.
Although the present disclosure and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the disclosure as defined by the appended claims. Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the present invention, disclosure, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present disclosure. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.