Hello everyone,
I must admit I am having exactly the same problems when I run my client. If I follow the Cart example and run my application as an application client, it does not access DB:
@EJB() private static Lamprem lamprem; try{ Lampent lampent=lamprem.getLamp(56468); System.out.println("retrieving details " + lampent.getLwoltage()); }//end of try catch(Exception ex){ System.out.println("Can not access DB data"); }//end of exception
I will send the exact error message through soon. However, when I run it as a stand alone client providing the following code:
try{ InitialContext ctx = new InitialContext(); Lamprem lamprem=(Lamprem) ctx.lookup("LampImpJNDI"); Lampent lampent=lamprem.getLamp(56468); System.out.println("retrieving details " + lampent.getLwoltage());}catch(Exception ex){ System.out.println("Can not access DB data"); }It seems to work.
The difference between my application and the Cart is that I access the DB through my entity. The Cart only has no entity class and it is accessing data through the remote interface directly.
eve
> Date: Tue, 27 Nov 2007 11:41:35 +0800
> From: sankar_at_infomindz.com
> To: ejb_at_glassfish.dev.java.net
> Subject: Re: Problem in access of Remote EJB 3.0
>
> Mahesh Kannan wrote:
> > Sankar wrote:
> >> Hi All,
> >> I am using Sun Java System web Server 7.0 and Sun Java System
> >> Application Server 9.0 update1
> >>
> >> I have problem in access of Remote EJB 3.0 in Sun Java System
> >> Application Server from our Web server..
> >> Please help me to access the EJB
> >>
> > Hi Sankar,
> > Did you follow the instructions provided in:
> > https://glassfish.dev.java.net/javaee5/ejb/EJB_FAQ.html
> >
> > --Mahesh
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
> >
> >
> Hi Mahesh,
> This link tell us to configure with tomcat web server only..
> I want configure with sun java system web server 7.0 with sun java
> system application server 9.0 update1
> please help me to look up in EJB 3.0 in Application server from web server.
>
> I am using JSF1.1 in web server, EJB 3.0 in application server...
>
> --
> Thanks & Regards,
> Sankar Mariappan,
> InfoMindz R&D,
> CyberJaya.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ejb-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: ejb-help_at_glassfish.dev.java.net
>
_________________________________________________________________
Celeb spotting – Play CelebMashup and win cool prizes
https://www.celebmashup.com