• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

x JSP's use one EJB ?????

 
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi together,
i have different JSP Sites and all should use "the same" stateful session bean, how can i realize that?
thank you
 
sharp shooter, and author
Posts: 1913
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
When you say "JSP sites", do you mean different web applications running on the same server?
Simon
p.s. please don't post questions in more than one forum - it's unecessary since most readers visit more than one forum anyway
 
Hrvoje Canzek
Greenhorn
Posts: 16
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
every JSP is part of one application and every JSP makes a lookup to find the bean.
Code example of every JSP:
---------------
<%! private Cart mybean = null;
public void jspInit()
{
try
{
InitialContext ic = new InitialContext();
Object objRef = ic.lookup("TheCart");
CartHome home = (CartHome)
PortableRemoteObject.narrow(objRef,
CartHome.class);
mybean = home.create();
}
catch (Exception ex)
{
System.out.println(ex);
}
}
%>
---------------
Step example: The first JSP makes a DB-Connection
and the second JSP(click in menu) should display the Table XY, the 3rd JSP makes an Insert into the table, and so on.
How can i implement this,so that this application uses one Stateful Session Bean. IS IT POSSIBLE???
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic