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 {
  super.init(config);
  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();            
    dummy.someOperation();
    // ...
  } 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!
Csaba
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/594210#594210]

Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2114]

_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to