Domanda

Am new to IBM Websphere. Am trying to port my Java EE product which was working on Weblogic to Websphere.

While going through Websphere documentation, I found something called createEJBstubs.bat/sh.

createEJBstub command usage instruction in IBM site

In weblogic, I have done ejb lookup by creating InitialContext and passing JNDI name to the lookup method to get the remote interface instance and use it to call the ejb methods.

Also, whenever a different application needs to call our ejb, they just add our ejb client jar in their pom dependency. Client jar is generated and installed to our local repository using maven-ejb-plugin by setting <generateClient>true</generateClient> configuration option.

  1. Could you please explain me what is the use of createEJBstubs?

  2. How is this related to deployment of ear?

  3. Do we need to generate the stub jar and packaged along with ear before deployment?

È stato utile?

Soluzione

Could you please explain me what is the use of createEJBstubs?

WebSphere Application Server Just-In-Time (JIT) deployment feature dynamically generates the RMI-IIOP stub classes that are required for invocation of remote EJB 3.0 business interfaces. But in some cases you need to create these stub files by yourself using createEJBstubs,
example: if your client is a Java SE application, then you have to create stubs

How is this related to deployment of ear?

createEJBstubs adds stubs to the JAR or EAR given in the command (as in the link you mentioned) so if your client project is included in Ear, you have to use createEJBstubs before deploying the Ear

Do we need to generate the stub jar and packaged along with ear before deployment?

if your client is a JAR file, there's nothing to do with EARs if your client is an EAR file, you have to run createEJBstubs with the client EAR in the path before deploying the Ear

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top