from servlet the Entity Bean access
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, November 26, 2001 02:16 AM

I wrote servlet that direct the data into the database write and read.

I wrote now Entity Bean and want I that my servlet those acces to

database by this Entity Bean and not direct.

perhaps it know someone like gehts

that or does whether it is moglich first?


thank you in advance

Re: from servlet the Entity Bean access

Posted By:   Benoit_Quintin  
Posted On:   Monday, November 26, 2001 06:42 AM

I am not sure I understand your question, but I,LL give you a hint as to how to access your EJB from your Java Classes, assuming you ha e an EJB engine and JNDI server started.



Properties p = new Properties();
p.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY, your_JNDI_factory_ClassName_here);
p.put(javax.naming.Context.PROVIDER_URL, "IIOP://localhost:900/");
InitialContext ic = new javax.naming.InitialContext(p);


javax.rmi.PortableRemoteObject.narrow(ic.lookup(EJB_name_here), object_class_name);

About | Sitemap | Contact