• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access ServletContext in business layer

 
Jean Marcel Bacan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I'm using a listener to start my OSGi container, so in the listener I instantiate my Framework passing the servlet container. (new Framework(servletContext))

While my framework is starting the container I must start my BundleActivator that also needs the servlet container. So I've this ugly thing:

Listener

Framework

Activator


Which is the best approach to decouple this servletContext? Singleton?

Thanks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic