This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Access ServletContext in business layer

Jean Marcel Bacan
Posts: 15
  • 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?

With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic