> when i deploy the war  to Tomcat,  and want to get my entity bean I can't
> find the Contex where my entity bean is.

I ran into the same problem with JBoss and Tomcat running in separate 
JVM's.

> Where can i put my jndi.properties file. 
> Any ideas???

Yup.....try something like this:

   Properties props = new Properties();
                        
   props.load( servlet.getServletContext().getResourceAsStream( 
                      "/WEB-INF/classes/jndi.properties" ) );

   InitialContext ctx = new InitialContext( props );

Put your jndi.properties file in the  specified subdirectory and then use the ctx 
as normal for an Entity Bean.

However, I must comment on your using an Entity bean as a remotely 
accessible component being accessed by a servlet or JSP.  For scalable 
systems, this is a poor design practice.  Best to "hide" the entity beans behind 
a service-oriented session bean facade.


Andrzej Jan Taramina
Chaeron Corporation: Enterprise System Solutions
http://www.chaeron.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to