Re: Session Bean in a Java ?
Friday, January 2, 2004 10:09 AM
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.