Return-Path: Delivered-To: apmail-beehive-user-archive@www.apache.org Received: (qmail 91546 invoked from network); 26 Jul 2006 14:23:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 26 Jul 2006 14:23:46 -0000 Received: (qmail 13808 invoked by uid 500); 26 Jul 2006 14:23:45 -0000 Delivered-To: apmail-beehive-user-archive@beehive.apache.org Received: (qmail 13545 invoked by uid 500); 26 Jul 2006 14:23:44 -0000 Mailing-List: contact user-help@beehive.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Beehive Users" Delivered-To: mailing list user@beehive.apache.org Received: (qmail 13533 invoked by uid 99); 26 Jul 2006 14:23:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:23:44 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of cshogue@gmail.com designates 66.249.92.171 as permitted sender) Received: from [66.249.92.171] (HELO ug-out-1314.google.com) (66.249.92.171) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 26 Jul 2006 07:23:43 -0700 Received: by ug-out-1314.google.com with SMTP id c2so3412609ugf for ; Wed, 26 Jul 2006 07:23:22 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=c3XQEfC2wMPL37eW6jFQqu6ooxUyOtPy6RVqbtXrHciSf6xD4HvDtuMp1WxmVPEqQGNNJDEXfgzYpD5c5O5F6TDl71NYEGdg6SlkBG1N/nbrjKyRgaxEcEt7Oh70UkJ/WyeutZNQpHxFf+PiAcWskJEsw/r/DAYJg30ZqNSmzjE= Received: by 10.82.109.13 with SMTP id h13mr224676buc; Wed, 26 Jul 2006 07:23:22 -0700 (PDT) Received: by 10.36.132.1 with HTTP; Wed, 26 Jul 2006 07:23:21 -0700 (PDT) Message-ID: Date: Wed, 26 Jul 2006 08:23:21 -0600 From: "Chris Hogue" To: "Beehive Users" Subject: Re: EJB Control doesn't work on java class In-Reply-To: <6D15592072771E4E9FA3F72E9AE767BE0323AB0E@mnoexc01.emea.cpqcorp.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6D15592072771E4E9FA3F72E9AE767BE0323AB0E@mnoexc01.emea.cpqcorp.net> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Hi Max, I'm not sure you can use @Control instantiation in a regular Java class. I don't believe there's anything that triggers the instantiation. When you run in a page flow or another control those have a "control container" that handles this. Have you tried programmatic instantiation as described here? http://beehive.apache.org/docs/1.0.1/controls/programming.html#Programmatic+Instantiation -Chris On 7/26/06, Ricci, Massimiliano (HPS C&I, HP-Italy) wrote: > 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 > (ProvaSessioBeanCtrl.java) following the same step described above. Then > I've created a (simple) Java class (Prova.java) 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, > Prova.controls.properties, ProvaClientInitializer.class, > ProvaSessioBeanCtrl.class, ProvaSessioBeanCtrlBean.class, > ProvaSessioBeanCtrlBean.class.manifest, > 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, > Max >