[jboss-user] [Microcontainer] - Re: Acessing Microcontainer Beans in Servlet

alesj do-not-reply at jboss.com
Tue Apr 3 05:20:43 EDT 2007


"obelix1998" wrote : 
  | The in the code I used the following (as suggested by you):
  | 
  | BasicBootstrap bootstrap;
  |   | bootstrap = new BasicBootstrap();
  |   | bootstrap.run();
  |   | Object target = bootstrap.getKernel().getController().getInstalledContext("surferCookieHandler").getTarget();
  |   | 
  | 
You need to get a hold of underlying Kernel reference, not create a new one - your new one of course doesn't know anything about your beans, which were deployed by the core Kernel.

Since I see you are trying to bind MC with Servlet, there is a whole sub-project written that already does similar: http://wiki.jboss.org/wiki/Wiki.jsp?page=EmbeddedAndTomcat

anonymous wrote : 
  | Could you please provide one WORKING example how this really works ?!!!
  | Please give an example, how to really make this work because as it is, it simply doesn't and I'm beginning to think, I'm wasting my time on this microcontainer :-(
  | 
No need to get nasty and frustrated, nobody learned '2 year dev project' over night. ;-)

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4033932#4033932

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4033932



More information about the jboss-user mailing list