File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access ServletContext in business layer

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

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:




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

I agree. Here's the link:
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic