Session Bean in a Java ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Monday, November 3, 2003 01:34 PM

I am using javabeans to handle Database connections, its easy to use beans with JSP, but how do i use that bean in a java code ?

Re: Session Bean in a Java ?

Posted By:   Anin_Mathen  
Posted On:   Friday, January 2, 2004 10:09 AM

Nitin,


Lot of questions remain to correctly explain your problem.
1) Is your DabaseConnection javabean a singleton ?

Ans: If so, you can write a getInstance() method to get you the object.
2) Is your java code being called from a jsp ?

Ans: If so you can pass this databaseConnection object to it as a parameter or if it is across multiple calls then even probably in the constructor of the object.


I think going through jguru's faq's will give you more answers and maybe a tutorial on jsps and javabeans from www.javaworld.com will help.


Anin
About | Sitemap | Contact