users@jersey.java.net

RE: [Jersey] RE: _at_EJB inj. Glassfish3 OK, WebLogic10.3 NOTOK

From: Ecker, Sandor (ext) <"Ecker,>
Date: Wed, 28 Jul 2010 15:57:23 +0200

Hallo Paul,

Thanks! I'm tring to do it.

I get something like this:

28.07.2010 15:52:17 com.sun.jersey.api.core.ScanningResourceConfig logClasses
INFO: Provider classes found:
  class com.siemens.imo.ra.cgis.presentation.list.restful.EJBProvider
28.07.2010 15:52:18 com.sun.jersey.server.impl.application.WebApplicationImpl in
itiate
INFO: Initiating Jersey application, version 'Jersey: 1.1.5.1 03/10/2010 02:33 P
M'
tring to look up: java:comp/env/ManagerService
javax.naming.NameNotFoundException: While trying to look up comp/env/Manage
rService in /app/webapp/cars/9964479.; remaining name 'comp/env/ManagerSe
rvice'
        at weblogic.jndi.internal.BasicNamingNode.newNameNotFoundException(Basic
NamingNode.java:1139)
        at weblogic.jndi.internal.ApplicationNamingNode.lookup(ApplicationNaming
Node.java:144)
        at weblogic.jndi.internal.WLEventContextImpl.lookup(WLEventContextImpl.j
ava:254)
        at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)


I have tried it so:

           String jndiName = "java:comp/env/" + c.getName();
            System.out.println("tring to look up: " + jndiName);

            final Object o = ic.lookup(jndiName);

And so too:

           String jndiName = "java:comp/env/" + c.getSimpleName();
            System.out.println("tring to look up: " + jndiName);

            final Object o = ic.lookup(jndiName);

But the same exception...

Maybe Weblogic needs other naming?

Thanks,
Regards,
Sandor

-----Original Message-----
From: Paul Sandoz [mailto:Paul.Sandoz_at_oracle.com]
Sent: Mittwoch, 28. Juli 2010 13:00
To: users_at_jersey.dev.java.net
Subject: Re: [Jersey] RE: @EJB inj. Glassfish3 OK, WebLogic10.3 NOTOK

Hi Sandor,

WebLogic 10.3 does not support Java EE 6, which is the simple answer
to why injection does not work.

A JAX-RS 1.1 implementation requires close integration with the app
server to support the requirements of injection.

It is possible to add focused injection support by using a Jersey API,
see here:

   http://jersey.576304.n2.nabble.com/EJB-Dependency-Injection-into-a-RESTFul-Web-Service-Jersey-td2409954.html

Paul.


On Jul 27, 2010, at 3:57 PM, Ecker, Sandor (ext) wrote:

> Hi,
>
> Ok, I have just tried the http://download.java.net/maven/2/com/sun/jersey/samples/jersey-ejb/1.3/jersey-ejb-1.3-project.zip
> on GF and WL.
>
> On GFv3 it works fine, but on WL not (no exceptions but does not
> work)...
>
> I don't know what to do now... Does it mean that WL is not supported?
>
> Thanks,
> Regards,
> Sandor
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
For additional commands, e-mail: users-help_at_jersey.dev.java.net