List Info

Thread: Factory pattern and naming context




Factory pattern and naming context
user name
2006-05-03 13:56:42
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.Harbulotmanchester.ac.uk] 
Sent: Wednesday, May 03, 2006 9:47 AM
To: wsrf-userws.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-unsubscribews.apache.org
For additional commands, e-mail: wsrf-user-helpws.apache.org


------------------------------------------------------------
---------
To unsubscribe, e-mail: wsrf-user-unsubscribews.apache.org
For additional commands, e-mail: wsrf-user-helpws.apache.org

Factory pattern and naming context
user name
2006-05-03 15:18:10
Indeed, it works fine with version 1.0!

Thanks,

Bruno.


Campana Jr., Salvatore J wrote:
> 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... 
> 

------------------------------------------------------------
---------
To unsubscribe, e-mail: wsrf-user-unsubscribews.apache.org
For additional commands, e-mail: wsrf-user-helpws.apache.org

[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )