Client distribution data
The Enterprise Bean Home interface/Remote interface compiled class must be set in the classpath to create an application that invokes the Enterprise Bean. This already compiled class is called "client distribution data".
Refer to the following manual when acquiring the client distribution data.
"Interstage Application Server J2EE User's Guide" > "Environment Setup for Referencing EJB" > "Setting Client Distribution Data"
java.naming.factory.initial property settings
If an Enterprise Bean is invoked from the client application, the system property must be set using the -D option of the java command in the following combinations:
Client type | Key | Value | Remarks |
---|---|---|---|
EJB client | java.naming.factory.initial | com.fujitsu.interstage.ejb.jndi.FJCNCtxFactoryForClient | |
J2EE application client | com.fujitsu.interstage.j2ee.jndi.InitialContextFactoryForClient | The EJB information to be referenced must be specified in the deployment descriptor of the J2EE application client. |
Using EAR if exposed as a Web service
If a Stateless Session Bean is exposed as a Web service, it must be deployed by an EAR file. Execute the [New EAR Application Project] wizard and create an enterprise application project. Select the Enterprise JavaBeans project as a J2EE module to be added to the enterprise application.
Naming service environment variables if using a remote server
To specify implementation of a class that accesses a naming service, specify the name of the implemented class in an environment property (java.naming.factory.initial), such as those shown below.
An EJB client can call only Enterprise Beans. (EJB clients are not capable of transaction control or accessing resources.)
Client type | Value |
---|---|
EJB client | com.fujitsu.interstage.ejb.jndi.FJCNCtxFactoryForClient |
J2EE application client | com.fujitsu.interstage.j2ee.jndi.InitialContextFactoryForClient |
The setting can be specified in the following:
jndi.properties file
FJjndi.properties file
javax.naming.InitialContext(Hashtable environment) argument
Argument (-D) on the java command line that starts an application
If an error occurs when a client application is actually run, the environment may not be correctly set up. Referring to the troubleshooting section in the "Interstage Studio User's Guide" and appropriate Interstage Application Server documentation, review the environment.
Specifying a naming service connection destination server for client products
Information about the destination of a naming service must be specified because the naming service is accessed, for example, to call Enterprise Beans in remote environment with Interstage Application Server client functions. Specify the applicable server in the following file:
Interstage Application Server installation folder\odwin\etc\inithost
Enterprise Bean cannot be invoked from a remote environment if the IJServer type at the deployment destination is [Web and EJB Applications run in the same Java VM]
If the IJServer type at the deployment destination is [Web and EJB Applications run in the same Java VM], an Enterprise Bean cannot be invoked from a remote environment. In order to invoke it from a client, the Enterprise Bean must be deployed to either the [Web and EJB Applications run in separate Java VMs] or the [EJB Applications Only] server type.
EJB2.1 applications not accessible from a remote environment
EJB2.1 Applications that run on Interstage Application Server cannot be accessed from remove environments. Therefore access EJB2.1 Applications locally from the Web Application.
JMS connection factory and destination
A JMS connection factory and destination must be created, even on the client side, to enable Message-driven Beans to run on a client server. Use the JMS operation commands to create these on the client side.
Perform the following registration processing on the client-side using the JMS operation commands of Interstage Application Server.
Registration of the JMS connection factory
The JMS connection factory need not be registered if the default JMS connection factory is used.
Use the jmsmkfact command if a JMS connection factory other than the default is to be used.
For details about the jmsmkfact command, refer to the "Interstage Application Server Reference Manual (Command Edition)".
Registration of the Destination definition
The jmsmkdst command is used to register the destination definition.
For details about the jmsmkdst command, refer to the "Interstage Application Server Reference Manual (Command Edition)".