• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB JNDI Not Being Published

 
Dennis Hopfer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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?
 
Jaikiran Pai
Sheriff
Posts: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does the test app contain? What kind of EJBs?
 
Dennis Hopfer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Simple stateless session bean:








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


 
Dennis Hopfer
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • 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: 43
  • Mark post as helpful
  • send pies
  • 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: 10447
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
  • 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: 43
  • Mark post as helpful
  • send pies
  • 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
 
Celinio Fernandes
Ranch Hand
Posts: 549
Eclipse IDE Google Web Toolkit Java
  • Mark post as helpful
  • send pies
  • 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: 43
  • Mark post as helpful
  • send pies
  • 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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!