--__--__--

Message: 8
Date: Fri, 21 Mar 2003 10:15:17 -0800
From: Matthew Hixson <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Have you configured properly the jndi.properties file?

Marco

Subject: [JBoss-user] default JNDI location for entity beans
Reply-To: [EMAIL PROTECTED]

I have a service locator class that tries to find my Message entity=20
bean. (Note the name of this bean is 'Message', but it really is an=20
entity bean, not a Message Driven Bean.  It will store email messages.)

                try{
                        _context =3D (Context) new=20
InitialContext().lookup("java:comp/env/ejb");
                        _messageLocalHome =3D (MessageLocalHome) =
_context.lookup("Message");
                }catch(NamingException ned){
                        _systemLogger.error("Couldn't initialize all of =
the business=20
objects: " +
                                                            =20
ned.getMessage());
                }=00

On the console I see this:

  09:41:03,404 ERROR [system] Couldn't initialize all of the business=20
objects: ejb not bound

Is there anything special I have to do to place my bean at a certain=20
place in JNDI?  I'm using xdoclet to generate jboss.xml and=20
jbosscmp-jdbc.xml.  Here's what I have in my MessageBean class.

/**
  * @ejb.bean
  *     view-type=3D"local"
  *     name=3D"Message"
  *     type=3D"CMP"
  *     cmp-version=3D"2.x"
  *     schema=3D"messages"
  *     local-jndi-name=3D"Message"
  *     primkey-field=3D"messageId"
  * @jboss.create-table create=3D"true"
  * @ejb.interface
  *     generate=3D"local"
  *     local-extends=3D"javax.ejb.EJBLocalObject"
  * @ejb.home
  *     local-extends=3D"javax.ejb.EJBLocalHome"
  * @ejb.persistence
  *     table-name=3D"messages"=00
  */

I thought that the default location was "java:com/env/ejb".  Is there=20
another value I should use in the call to InitialContext().lookup()?
   Thanks,
     [EMAIL PROTECTED]


-------------------------------------------------------
This SF.net email is sponsored by:Crypto Challenge is now open! 
Get cracking and register here for some mind boggling fun and 
the chance of winning an Apple iPod:
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0031en
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to