You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Sid Ferreira <si...@gmail.com> on 2009/01/14 14:30:20 UTC

EJB questions about Jumpstart

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

Re: EJB questions about Jumpstart

Posted by Sid Ferreira <si...@gmail.com>.
Indeed it seems that was lack of configurations... I'll check it out...
Thanks

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

> Also
> http://markmail.org/message/jmi4opzz52pcr2cf#query:+page:1+mid:3madrl6pya4i7sei+state:results
>
> On 16/01/2009, at 12:39 AM, Sid Ferreira wrote:
>
>  was within an ear
>>
>> On Thu, Jan 15, 2009 at 11:26 AM, Geoff Callender <
>> geoff.callender.jumpstart@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.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>  --
>>>>>> Sidney G B Ferreira
>>>>>> Desenvolvedor Web - Tibox Innovations
>>>>>>
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sidney G B Ferreira
>>>> Desenvolvedor Web - Tibox Innovations
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>
>> --
>> Sidney G B Ferreira
>> Desenvolvedor Web - Tibox Innovations
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Re: EJB questions about Jumpstart

Posted by Geoff Callender <ge...@gmail.com>.
Also http://markmail.org/message/jmi4opzz52pcr2cf#query:+page:1+mid:3madrl6pya4i7sei+state:results

On 16/01/2009, at 12:39 AM, Sid Ferreira wrote:

> was within an ear
>
> On Thu, Jan 15, 2009 at 11:26 AM, Geoff Callender <
> geoff.callender.jumpstart@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.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Sidney G B Ferreira
>>>>> Desenvolvedor Web - Tibox Innovations
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Sidney G B Ferreira
>>> Desenvolvedor Web - Tibox Innovations
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> -- 
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EJB questions about Jumpstart

Posted by Geoff Callender <ge...@gmail.com>.
Your lookup string looks fine according to the doco I've just read.

Have you confirmed the jndi entries exist and their format?  See http://www.myeclipseide.com/PNphpBB2-viewtopic-t-18850.html

Have you provided jndi properties to the InitialContext? This is  
usually done by putting a jndi.properties in the classpath (Glassfish  
server may already have one?) or specifying the properties  
programmatically .

This FAQ may help: https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html

Beyond that  I can't help without imitating your setup which I  
unfortunately don't have time to do. Sorry if I have only covered  
ground you have already covered.

Geoff

On 16/01/2009, at 12:39 AM, Sid Ferreira wrote:

> was within an ear
>
> On Thu, Jan 15, 2009 at 11:26 AM, Geoff Callender <
> geoff.callender.jumpstart@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.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>> --
>>>>> Sidney G B Ferreira
>>>>> Desenvolvedor Web - Tibox Innovations
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> --
>>> Sidney G B Ferreira
>>> Desenvolvedor Web - Tibox Innovations
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> -- 
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EJB questions about Jumpstart

Posted by Sid Ferreira <si...@gmail.com>.
was within an ear

On Thu, Jan 15, 2009 at 11:26 AM, Geoff Callender <
geoff.callender.jumpstart@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.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>> --
>>>> Sidney G B Ferreira
>>>> Desenvolvedor Web - Tibox Innovations
>>>>
>>>>
>>>
>>>
>>
>> --
>> Sidney G B Ferreira
>> Desenvolvedor Web - Tibox Innovations
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Re: EJB questions about Jumpstart

Posted by Geoff Callender <ge...@gmail.com>.
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.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>
>>>>
>>>>
>>>
>>> --
>>> Sidney G B Ferreira
>>> Desenvolvedor Web - Tibox Innovations
>>>
>>
>>
>
>
> -- 
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: EJB questions about Jumpstart

Posted by Sid Ferreira <si...@gmail.com>.
@Stateless only

On Thu, Jan 15, 2009 at 11:16 AM, Geoff Callender <
geoff.callender.jumpstart@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.jumpstart@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-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>>
>>
>> --
>> Sidney G B Ferreira
>> Desenvolvedor Web - Tibox Innovations
>>
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Re: EJB questions about Jumpstart

Posted by Geoff Callender <ge...@gmail.com>.
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.jumpstart@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-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>
> -- 
> Sidney G B Ferreira
> Desenvolvedor Web - Tibox Innovations


Re: EJB questions about Jumpstart

Posted by Sid Ferreira <si...@gmail.com>.
Glassfish V2, based on a friend's response.

On Thu, Jan 15, 2009 at 11:07 AM, Geoff Callender <
geoff.callender.jumpstart@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-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>


-- 
Sidney G B Ferreira
Desenvolvedor Web - Tibox Innovations

Re: EJB questions about Jumpstart

Posted by Geoff Callender <ge...@gmail.com>.
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-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org