Bruno,
It seems as though you are using the WSRF 1.1
release...Please use the
WSRF 1.0 release as 1.1 made many changes which we've
wanted to
revert...
Since we will be having a contribution from IBM which will
move this
stuff towards the latest specs and provide a pluggable layer
for other
implementations..that will be the way to go moving
forward...until we
get them on board you should work with 1.0...
-----Original Message-----
From: Bruno Harbulot [mailto:Bruno.Harbulot manchester.ac.uk]
Sent: Wednesday, May 03, 2006 9:47 AM
To: wsrf-user ws.apache.org
Subject: Factory pattern and naming context
Hello,
I'm trying to build a factory for the filesystem example
provided with
Apache WSRF. In my FilesystemfactoryService, method
createFileSystemResource is written along the lines of this:
Context initialContext = new InitialContext();
FilesystemHome home =
(FilesystemHome)initialContext.lookup(FilesystemHome.HOME_LO
CATION) ;
FilesystemResource fsresource = new FilesystemResource() ;
fsresource.setID("ABC1") ; // Just to test...
fsresource.init() ;
home.add(fsresource) ;
(FilesystemHome.HOME_LOCATION contains
"wsrf/services/filesystem/home").
This follows more or less the resourceadmin example in the
MUSE example.
When invoking this operation, I get the following exception:
javax.naming.NameNotFoundException: Name services is not
bound in this
Context
at
org.apache.naming.NamingContext.lookup(NamingContext.java:80
4)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:15
5)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:81
5)
at
org.apache.naming.NamingContext.lookup(NamingContext.java:16
8)
at
javax.naming.InitialContext.lookup(InitialContext.java:351)
at
org.apache.ws.resource.example.filesystemfactory.Filesystemf
actoryServic
e.createFileSystemResource(FilesystemfactoryService.java:58)
Did I miss something? How is the factory supposed to get
hold of the
instance of FilesystemHome to add new instances?
I also noticed that the examples in WSRF were using
wsrf-config.xml and
the springBeansXmlMerger ant task whereas the MUSE examples
were using
jndi-config.xml and the jndiUpdater ant task. Although the
principles of
the configuration files seem similar, they are different.
Could this
have an influence on the NamingContext problem?
Regards,
Bruno.
------------------------------------------------------------
---------
To unsubscribe, e-mail: wsrf-user-unsubscribe ws.apache.org
For additional commands, e-mail: wsrf-user-help ws.apache.org
------------------------------------------------------------
---------
To unsubscribe, e-mail: wsrf-user-unsubscribe ws.apache.org
For additional commands, e-mail: wsrf-user-help ws.apache.org
|