File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes EJB and other Java EE Technologies and the fly likes where should I put ejb-jar.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "where should I put ejb-jar.xml" Watch "where should I put ejb-jar.xml" New topic
Author

where should I put ejb-jar.xml

Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Hi. I cannot find out where to place ejb-jar.xml file. I want to use it to inject some resource (String, int), but my application then won't to deploy.
I put ejb-jar.xml file into top level of my-ejb.jar file:

my-ejb.jar
|
|
|-----ejb-jar.xml
|------com.test.SomeBeans



I was try to inject resource like this in MDB :

and this ejb-jar.xml:


or if I try this way in stateless bean:

and ejb-jar.xml :


or if I put ejb-jar.xml file into META-INF/ejb-jar.xml, I get the same result. The EAR application, won't deploy!
So what and where I should put???
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

It's supposed to go in META-INF/ejb-jar.xml. Is that your full ejb-jar.xml? It's supposed to have a line on top of that which declares the schema.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Goran Markovic
Ranch Hand

Joined: Sep 26, 2008
Posts: 399
Thanks Jeanne, my mistake (I was pretty much exhausted) and oversight two ejb element in my DD. it is works now. Thanks
 
 
subject: where should I put ejb-jar.xml