Note: I am using WSAD 5.1.
Its like I have a generalized (modularized common) EJB jar which will be used other application in the project.
In JBoss 2.4.1 we just place it in *deploy* directory of the app server. It will be globally available and can be accessed by any application. After I include the external EJB jar in my WSAD 5.1 and try to run the application, my application is unavailable to find the JNDI name to access the EJB from the external jar.
Generally when the app server runs the EJB jar is available globally in the app server memory place.
Now my application is unavailable to find the JNDI name, when I try to call the EJB from the external jar.
Main Topics
Browse All Topics





by: damonfPosted on 2004-12-23 at 09:41:35ID: 12894162
I don't really understand your question. You're saying you have some EJBs in one jar file ... and now you have a new application that wants to use those EJBs but will also have its own?
If this is the case, you can put all the classes for you old app into a jar file. Put the jar file in the EAR project. Then create a manifest classpath reference to the jar file in the EAR project from your EJB project. Do this in WSAD by right clicking on the EJB project, properties, java build path. Then click "add jar" button and find the jar file.
The next step is you actually have to deploy the new EJBs inside your application ... this means you have to create entries in the ejb-jar.xml for the EJBs you want, but you're pointing to the class files in the jar.
However, if you don't wish to repackage the EJBs in your app, you can actually call them in the other app (assuming it's available). If it is, you need to generate the client.jar for the first app and add it to the second app ... then just access the EJBs as you normally would from a client.