• 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
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

JNDI binding weird behaviour

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I have a seam generated application with Statles sessions beans.
The app name is myapp and inside it there is a myapp.jar file wich contains the stateless sessions.

After jboss 4.2.3 is started I can see my statless session beans mapped to myapp/EJBNAME/local
EJBNAME = name of the Statles EJB class

I am able to lookup any statless session bean using the jndi mapping above as long as myapp.jarfile name is unchanged.

If I change myapp.jar file name to test.jar and also change the in application.xml this :
<module>
<ejb>myapp.jar</ejb>
</module>
to:
<module>
<ejb>test.jar</ejb>
</module>

I am unable to lookupany of my statless session beans.

I do not know why is this and if there is a work around.

Could anyone help on this?

Thank you


I
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Joe,

By default, JBoss uses the application name to bind the beans to JNDI. However, you can override this behaviour by using the LocalBinding and RemoteBinding annotations. See this for JBossAS-4.x example http://www.jboss.org/jbossejb3/docs/tutorial/jndibinding/jndi.html
 
Ioan Berciu
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you for your answer I manage to make it work.
 
It's just like a fortune cookie, but instead of a cookie, it's pie. And we'll call it ... tiny ad:
free, earth-friendly heat - a kickstarter for putting coin in your pocket while saving the earth
https://coderanch.com/t/751654/free-earth-friendly-heat-kickstarter
reply
    Bookmark Topic Watch Topic
  • New Topic