was within an ear

On Thu, Jan 15, 2009 at 11:26 AM, Geoff Callender <
geoff.callender.jumpst...@gmail.com> wrote:

> I haven't used Glassfish, but here goes my best guess...
>
> I see there is a FAQ in Glassfish about this.  If you have the WAR and JAR
> together in an EAR then you might be able to get away with injecting the
> bean into the web class with @EJB.  See
> https://glassfish.dev.java.net/javaee5/ejb/examples/Sless.html .
>
> Are you accessing remotely or from within an EAR?
>
>
> On 16/01/2009, at 12:19 AM, Sid Ferreira wrote:
>
>  @Stateless only
>>
>> On Thu, Jan 15, 2009 at 11:16 AM, Geoff Callender <
>> geoff.callender.jumpst...@gmail.com> wrote:
>>
>>  How are the sesson beans annotated and interaced?  eg. in JumpStart
>>> PersonService is like this:
>>>
>>> @Stateless
>>> @Local(IPersonServiceLocal.class)
>>> @Remote(IPersonServiceRemote.class)
>>> public class PersonService implements IPersonServiceLocal,
>>> IPersonServiceRemote {
>>>
>>>
>>>
>>> On 16/01/2009, at 12:11 AM, Sid Ferreira wrote:
>>>
>>> Glassfish V2, based on a friend's response.
>>>
>>>>
>>>> On Thu, Jan 15, 2009 at 11:07 AM, Geoff Callender <
>>>> geoff.callender.jumpst...@gmail.com> wrote:
>>>>
>>>> The PersistenceContext unitName is not the problem at this point.  It is
>>>>
>>>>> used to map persistence of an entity to a datasource.  Your problem,
>>>>> however, is how to look up a session bean from a client. What EJB
>>>>> container
>>>>> are you using? JBoss 4.3? This is important because it will determine
>>>>> the
>>>>> format of the names of the session beans registered in JNDI.
>>>>>
>>>>>
>>>>> On 15/01/2009, at 12:30 AM, Sid Ferreira wrote:
>>>>>
>>>>> OBS: I was going to send just for Geoff, but maybe someone else could
>>>>> know
>>>>>
>>>>>  the answer.
>>>>>>
>>>>>> Im studing the EJB example but Im failing to make mine work.
>>>>>> Im trying to load ClientesUsuarioFacade or  ClientesUsuarioFacadeLocal
>>>>>> (Im
>>>>>> newbie, got a challenge that can mean use T5 in my company and also my
>>>>>> personal projects).
>>>>>>
>>>>>> In the example it is used "jumpstart/PersonService/local", and Ive
>>>>>> noticed
>>>>>> that @PersistenceContext(unitName = "jumpstart") exists in the
>>>>>> PersonService
>>>>>> model, wich probably means unitname/modelname/type. In the EJBs
>>>>>> provided
>>>>>> to
>>>>>> me, unitname isn't set, and the only way I found to make it work as
>>>>>> defining
>>>>>> th ejb in the xml and using the following functions:
>>>>>>
>>>>>> static public UsuariosClienteFacadeLocalExt UsuariosCliente() throws
>>>>>> Exception{ try { Context c = new InitialContext(); return
>>>>>> (UsuariosClienteFacadeLocalExt)
>>>>>> c.lookup("java:comp/env/UsuariosClienteFacade"); } catch (Exception e)
>>>>>> {
>>>>>> throw new Exception("FacadeLocator Failure"); } }
>>>>>>
>>>>>> They are similars, but the address java:comp isn't friendly as the
>>>>>> another.
>>>>>>
>>>>>> So, I want to find a way to make it easyer, being coding or blaming
>>>>>> the
>>>>>> badly done EJB.
>>>>>>
>>>>>> Thanks in advance
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Sidney G B Ferreira
>>>>>> Desenvolvedor Web - Tibox Innovations
>>>>>>
>>>>>>
>>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
>>>>> For additional commands, e-mail: users-h...@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sidney G B Ferreira
>>>> Desenvolvedor Web - Tibox Innovations
>>>>
>>>>
>>>
>>>
>>
>> --
>> Sidney G B Ferreira
>> Desenvolvedor Web - Tibox Innovations
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Reply via email to