tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andreessen <andrees...@list.ru>
Subject Binding custom WebServiceContext problems.
Date Thu, 21 Jan 2010 17:54:54 GMT

Hi people,
Just ran into problems with binding. I am using OpenEJB for WS tests and
need to bind my custom WebServiceContext with JNDI to make 
@Resource
WebServiceContext wctx;
works properly for my tests.

In my setUp method I do the following:

Properties props = new Properties();
        props.put(javax.naming.Context.INITIAL_CONTEXT_FACTORY,
                "org.apache.openejb.client.LocalInitialContextFactory");
        props.setProperty("openejb.embedded.remotable", "true");
initialContext = new InitialContext(props);
        WebServiceContextStub wctxStub = new WebServiceContextStub();
 initialContext.bind("java:comp/WebServiceContext", wctxStub);
        wctxStub =
(WebServiceContextStub)initialContext.lookup("java:comp/WebServiceContext");

But the last line throws javax.naming.NameNotFoundException: Name
"comp/WebServiceContext" not found. (jndi name was taken from 
http://svn.apache.org/viewvc/incubator/openejb/trunk/openejb3/container/openejb-core/src/main/java/org/apache/openejb/core/stateless/StatelessInstanceManager.java?p2=%2Fincubator%2Fopenejb%2Ftrunk%2Fopenejb3%2Fcontainer%2Fopenejb-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fopenejb%2Fcore%2Fstateless%2FStatelessInstanceManager.java&p1=%2Fincubator%2Fopenejb%2Ftrunk%2Fopenejb3%2Fcontainer%2Fopenejb-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fopenejb%2Fcore%2Fstateless%2FStatelessInstanceManager.java&r1=531838&r2=531837&pathrev=531838&view=diff&diff_format=s
here ).
How could it be done? Appreciate for your help...


-- 
View this message in context: http://n4.nabble.com/Binding-custom-WebServiceContext-problems-tp1049990p1049990.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message