This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes EJB and other Java EE Technologies and the fly likes What is the missing link in these descriptors? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "What is the missing link in these descriptors?" Watch "What is the missing link in these descriptors?" New topic
Author

What is the missing link in these descriptors?

James Davison
Greenhorn

Joined: Mar 28, 2004
Posts: 27
I have a 3rd-party EJB contained in a project in my workspace that I need to add to my web application I am using Rational Application Developer 6.0 as my IDE and WebSphere 5.0 as my RAD test environment. I modified the EAR and WAR descriptors to add the EJB module/project to the application descriptor and an EJB reference to the web descriptor. See the following entries. However, the EJB does not even load when the WebSphere test environment is started even though the EJB project is clearly configured for the EAR (as viewed in Server >> Add and Remove Projects...). I know I am missing something obvious here, but what? Do I need to configure something in the Administrative Console perhaps?

EAR application.xml has the entry:

<module id="EjbModule_1174410560257">
<ejb>TextFileEJB.jar</ejb>
</module>

EAR .modulemaps has the entry:

<mappings xmi:id="ModuleMapping_1174410560257" projectName="TextFileEJB">
<module xmi:type="application:EjbModule" href="META-INF/application.xml#EjbModule_1174410560257"/>
</mappings>


WAR web.xml has the entry:

<ejb-ref id="EjbRef_1174318503244">
<description></description>
<ejb-ref-name>ejb/TextFile</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>TextFilePackage.TextFileHome</home>
<remote>TextFilePackage.TextFile</remote>
</ejb-ref>

WAR ibm-web-bnd.xmi has the entry:

<ejbRefBindings xmi:id="EjbRefBinding_1174318503244" jndiName="TextFile">
<bindingEjbRef href="WEB-INF/web.xml#EjbRef_1174318503244"/>
</ejbRefBindings>
James Davison
Greenhorn

Joined: Mar 28, 2004
Posts: 27
Nevermind! It seems all I had to do was remove the EAR project then re-add the EAR project to the test server.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: What is the missing link in these descriptors?
 
Similar Threads
linking webapp with ejb in ear
Error looking up EJB
java.Nullpointer Exception
Accessing EJB from servlet in WAR file
jndi lookup for an ejb through a servlet.