users@glassfish.java.net

RE: At-sign EJB annotation question.

From: Todd Patrick <Todd.Patrick_at_dtn.com>
Date: Fri, 16 Feb 2007 15:37:53 -0600

Mahesh:

Thank you, that was it.

So a JSF Manage Bean with a session scope would need a copy of the
object for each instance... that makes sense.

Thanks again,

--Todd



-----Original Message-----
From: Mahesh.Kannan_at_Sun.COM [mailto:Mahesh.Kannan_at_Sun.COM]
Sent: Friday, February 16, 2007 1:36 PM
To: users_at_glassfish.dev.java.net; Todd Patrick
Subject: Re: At-sign EJB annotation question.

Hi Todd,
  Does the customerSessionRemote need to be static? Just remove the
static and injection should work Thanks, --Mahesh


Todd Patrick wrote:

>Java 6
>Sun Java System Application Server Platform Edition 9.0_01 (build b14)
>Windows XP (development environment)
>
>>From the server.log file, it looks like both beans are loaded.
>
>**RemoteBusinessJndiName:
>com.dtn.petro2.petroadmin.bean.customer.CustomerSessionRemote;
>remoteBusIntf:
>com.dtn.petro2.petroadmin.bean.customer.CustomerSessionRemote
>
>LDR5010: All ejb(s) of [projectlabel] loaded successfully!
>
>
>In my JSF backing bean I have the following At-sign EJB annotation:
>
>@EJB
>private static CustomerSessionRemote customerSessionRemote;
>
>When I debug this in Netbeans, the debugger never hits this line if I
>have a breakpoint set to it and I get a NullPointerException.
>
>Since I've set this as a Stateless Session Bean with a Remote business
>interface, do I need to do more than just use the @EJB annotation to
>call the remote business interface defined as the following?
>
>
>package com.company.bean.customer;
>
>import javax.ejb.Remote;
>
>@Remote
>public interface CustomerSessionRemote {
> java.util.List<com.dtn.petro2.petro_lib.CustomerDetail>
>doSearch(String _clientID, String _company, String _customerID, String
>_devcAddr, String _devcTypeID, String _firstName, String _lastName,
>String _omSiteID, String _siteID);
>
>}
>
>
>Thanks,
>
>--Todd
>
>-----------------------------------------
>NOTICE: This email message is for the sole use of the intended
>recipient(s)
>and may contain confidential and privileged information. Any
>unauthorized
>use, disclosure or distribution is prohibited. If you are not the
>intended
>recipient, please contact the sender by reply email and destroy all
>copies
>of the original message.
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
>For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>
>