beehive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ricci, Massimiliano \(HPS C&I, HP-Italy\)" <>
Subject EJB Control doesn't work on java class
Date Wed, 26 Jul 2006 08:37:29 GMT
Hi folks,

I'm trying to use Beehive EJB control in my project.
I've done two tests.
In the first one I've created a Session EJB ("ProvaSessionBean") using
IBM Application Server Toolkit (AST), with just one method (String
welcomeName (String name)), and imported (the jar file) it on BEA
Workshop 9.2.0 for Weblogic Platform. I've created a new "Dynamic Web
Project" using Beehive facets (Controls & NetUI). By the wizard I've
created an EJB Control (filling the field "JNDI Name" with the value in
META-INF\ibm-ejb-jar-bnd.xmi ("ejb/ejbs/ProvaSessionBeanHome") and from
META-INF\ejb-jar.xml for Home/Business Interface
("ejbs.ProvaSessionBean" and "ejbs.ProvaSessionBeanHome")).

In Controller class I've instanced the EJB Control by annotation
(@Control) and call the EJB method in the Controller method. I've
exported the ear file and deployed it on IBM WebSphere Application
Server 6.1
In this case all work correctly.

Then I've tried to use the EJB Control in a normal Java class.
I've imported the EJB (jar) in my project, and created a "Dynamic Web
Project" not using Beehive technology (in particular Beehive NetUI).
I've imported jar to use EJB Control (beehive-controls.jar,
beehive-ejb-control.jar) and created EJB Control
( following the same step described above. Then
I've created a (simple) Java class ( to instance the control
(using annotation @Control) and use EJB method, and a jsp page where I
called this java class.
I've exported the ear file and deployed it on IBM WebSphere Application
Server 6.1.
When I've tested the application a "java.lang.NullPointerException" was
generated because the EJB Control in java class not was instanced!
I've checked that every class by APT was created (Prova.class,, ProvaClientInitializer.class,
ProvaSessioBeanCtrl.class, ProvaSessioBeanCtrlBean.class,
ProvaSessioBeanCtrlBeanBeanInfo.class) and all seems correct.

Have anybody some idea because EJB Control doesn't work on java class? 
Is it possibile use Beehive EJB Control (or Beehive Control in general)
in a Java class instead in a PageFlow?

Thanks in advance,

View raw message