[jboss-user] [JBoss Microcontainer] - How to access MC pojo beans from a RAP app

Csaba Szucs do-not-reply at jboss.com
Sat Mar 19 06:09:19 EDT 2011

Csaba Szucs [http://community.jboss.org/people/CsabaSzucs] created the discussion

"How to access MC pojo beans from a RAP app"

To view the discussion, visit: http://community.jboss.org/message/594210#594210

Hello Guys,

We have a J2EE web app with a JSP/Servlet based UI.
We would like to reimplement the UI-layer in Eclipse/RAP technology.

So from now on the RAP UI layeer will invoke BU classes such as:
 o EJB classes (session beans, entity beans, message driven beans)
 o JBoss MicroController POJO beans

Unfortunately I have trouble to access an MC bean from RAP.

To call an MC bean operation from a servlet init() method was easy like:

public void init(ServletConfig config) throws ServletException {
  try {
    KernelControllerVDFConnector connector = new KernelControllerVDFConnector(config.getServletContext());
    if (connector.isValid() == false) throw new ServletException("Illegal VDF component, no MC Kernel present.");
    KernelController controller = connector.getUtility();
    ControllerContext ctx = controller.getInstalledContext("AJBossMCBean");
    AJBossMCBeanInterface dummy = (AJBossMCBeanInterface) ctx.getTarget();            
    // ...
  } catch(Exception e ) {
    // ...

Within RAP, I can also provide a ServletContext object, but the KernelControllerCDFConnector.valid() always return a false value.

How can I solve this issue?

Many thanks in advance!

Reply to this message by going to Community

Start a new discussion in JBoss Microcontainer at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110319/9a99fbaa/attachment-0001.html 

More information about the jboss-user mailing list