• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

where should I put ejb-jar.xml

 
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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???
 
author & internet detective
Posts: 41860
908
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Goran Markovic
Ranch Hand
Posts: 399
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Jeanne, my mistake (I was pretty much exhausted) and oversight two ejb element in my DD. it is works now. Thanks
 
snakes are really good at eating slugs. And you wouldn't think it, but so are tiny ads:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic