Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
Last week, we had the author of TDD for a Shopping Website LiveProject. Friday at 11am Ranch time, Steven Solomon will be hosting a live TDD session just for us. See for the agenda and registration link
  • 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

EJB JNDI Not Being Published

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From the Glassfish admin console I see nothing under the JNDI dropdown even though my test app seems to have been deployed. My understanding is that EJB apps automatically get pushed out to JNDI as part of the container's services. Is that wrong? Shouldn't it be visible there? I do see the app in the Applications drop down menu.

Any help?
 
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
What does the test app contain? What kind of EJBs?
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Simple stateless session bean:








Sun-EJB-Jar.xml (ripped off the web) looks like:


 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Help guys!

I'm total newb and I can't even get EJB 3.1 to work!

Help a newb out, for the Holidays!
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Using latest build of Eclipse, Glassfish3 and EJB 3.1:

1) What should the MANIFEST.MF contain?

2) Does JNDI build-up/tear-down depend on sun-ejb-jar.xml file or does the container manage this automatically?

3) Merry Christmas!

 
Jaikiran Pai
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

Dennis Hopper wrote:
3) Merry Christmas!


Merry Christmas!

Dennis Hopper wrote:

1) What should the MANIFEST.MF contain?



MANIFEST.MF can be empty.

Dennis Hopper wrote:
2) Does JNDI build-up/tear-down depend on sun-ejb-jar.xml file or does the container manage this automatically?


The sun-ejb-jar.xml contains app server specific deployment configurations. Like the jndi name to which you want your beans to be bound to. That file is not mandatory. If you are using EJB3.1, then the file you posted earlier doesn't look relevant. It contains EJB2.x related constructs. Try removing that file altogether.
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hey Jaikiran!

So, yeah I tried pulling the XML file altogether and it still isn't grabbing the bean via JNDI. I'm not sure if the bean is published but I'm not using the right string to look it up or if it's just not being published as a JNDI resource. Any fool proof way to know for sure?

Thanks,

DH
 
Ranch Hand
Posts: 563
Google Web Toolkit Eclipse IDE Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
when you deploy the application, you should see, in verbose mode, in the server logs the information about the portable or Glassfish-specific JNDI names for the EJB.
You don't see them ?
 
Dennis Hopfer
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Only thing I see in the logs (I set everything to FINEST log setting) when I try and run the EJB is:

[#|2010-12-26T00:01:45.170-0500|INFO|oracle-glassfish3.0.1|javax.enterprise.system.tools.admin.org.glassfish.server|_ThreadID=21;_ThreadName=Thread-1;|JMXStartupService: Started JMXConnector, JMXService URL = service:jmx:rmi://Desktop:8686/jndi/rmi://Desktop:8686/jmxrmi|#]

Not sure what to make of it really.
 
a wee bit from the empire
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic