Hi there, I did some research on it, seems that the cause is that the context is NOT serializable, and because of that, the client complains " NotContextException". Also, in jboss.jcml, the "RemoteAccess" should be set to "true" (if "false", client only get a ref, that is why it complains "CannotProceedException". However, the online doc http://www.jboss.org/documentation/HTML/ch11s145.html does not indicates the key issue is whether the jndi's service provider's "context" is serializable. So, the following statement is not totally accurate (beause even it refers to a common network path, it still does not work): "For the FileSystem example this most likely won't work unless the FileSystem path refers to a common network path." My new questions: 1) is my understanding is correct? 2) a workaround? I saw a post by Scott M Stark on 21 Nov 2000, is it useful for sun's file system? http://www.mail-archive.com/[email protected]/msg06258.html thanks in advance!!!! Kai [EMAIL PROTECTED] Sent by: To: [EMAIL PROTECTED] [EMAIL PROTECTED] cc: eforge.net Subject: Non-ejbean client access jnp-federated file system? can it be done??? 05/10/2001 06:00 PM Please respond to jboss-user Anybody succeed in making non-ejbean client (i.e. ordinary client) access windows file system via jnp federated namespace? The federated namespace itself seems working, after setup, the tree is like this: Global JNDI Namespace +- jmx:TWILIGHT:rmi +- TopicConnectionFactory +- XAQueueConnectionFactory +- jmx +- UILXAQueueConnectionFactory +- RMIXAQueueConnectionFactory +- RMIQueueConnectionFactory +- ejb20-statelessSession-TraderHomessss +- external | +- fs | | +- Scott | | | +- .bindings +- XATopicConnectionFactory ............... ------------------------------------------------------------------------ test code: ---------------------------------------------------------------------- Properties env = new Properties(); env.setProperty(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); //env.setProperty(Context.PROVIDER_URL, "localhost:/external/fs"); //==Q2 env.setProperty(Context.PROVIDER_URL, "localhost:/external");//==== Q2 //env.setProperty(Context.PROVIDER_URL, "localhost:/external/fs/Scott"); env.setProperty(Context.URL_PKG_PREFIXES , "org.jboss.naming:org.jnp.interfaces"); System.out.println("Connecting to JNDI, env="+env); InitialContext ctx = new InitialContext(env); System.out.println("Connected to JNDI"); NamingEnumeration list = ctx.list(""); // Q2 //NamingEnumeration list = ctx.list("external"); // = Q1 //NamingEnumeration list = ctx.list("external/fs"); //= Q1 //NamingEnumeration list = ctx.list("external/fs/Scott"); // Q1 // Go through each item in list while (list.hasMore()) { NameClassPair nc = (NameClassPair)list.next(); System.out.println(nc); } --------------------------------------------------------------------------- Q1) when ctx.list("external") or ctx.list("external/fs"), the results are the expected: Connecting to JNDI, env={java.naming.provider.url=localhost:/external/fs, java.naming.factory.initial=org.jnp.interfaces.NamingCont xtFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} Connected to JNDI fs: org.jnp.interfaces.NamingContext However, when ctx.list("external/fs/Scott"), it does not work anymore! It seems related with the <attribute name="RemoteAccess">true</attribute> in jboss.jcml, because when it is set true, the output is: --------------------------------------------------------------- Connecting to JNDI, env={java.naming.provider.url=localhost:/external/fs, java.naming.factory.initial=org.jnp.interfaces.NamingConte xtFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} Connected to JNDI Operation failed: javax.naming.NotContextException ---------------------------------------------------------------- if it is set false, then, the output: ----------------------------------------------------------------- C:\jbossFromSrc\examples\jndi>java tstNS Connecting to JNDI, env={java.naming.provider.url=localhost:/external/fs, java.naming.factory.initial=org.jnp.interfaces.NamingConte xtFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} Connected to JNDI Operation failed: javax.naming.CannotProceedException; remaining name '' ----------------------------------------------------------------- ----------------------------------------------------------------- Q2) During the process of trying solve the issue of Q1, I encountered another issue, perhaps can provide some clues?: There is no difference that Context.PROVIDER_URL is "localhost/external/fs" or "localhost:/external", or "localhost", the results of ctx.list("") are the same! When use external:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ C:\jbossFromSrc\examples\jndi>java tstNS Connecting to JNDI, env={java.naming.provider.url=localhost:/external, java.naming.factory.initial=org.jnp.interfaces.NamingContextF actory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} Connected to JNDI jmx:TWILIGHT:rmi: org.jboss.jmx.server.RMIConnectorImpl TopicConnectionFactory: org.jbossmq.SpyTopicConnectionFactory XAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory jmx: org.jboss.jmx.server.JMXAdaptorImpl UILXAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory RMIXAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory RMIQueueConnectionFactory: org.jbossmq.SpyQueueConnectionFactory ejb20-statelessSession-TraderHomessss: $Proxy3 external: org.jnp.interfaces.NamingContext XATopicConnectionFactory: org.jbossmq.SpyXATopicConnectionFactory When use external/fs:~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Connecting to JNDI, env={java.naming.provider.url=localhost:/external/fs, java.naming.factory.initial=org.jnp.interfaces.NamingConte xtFactory, java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces} Connected to JNDI jmx:TWILIGHT:rmi: org.jboss.jmx.server.RMIConnectorImpl TopicConnectionFactory: org.jbossmq.SpyTopicConnectionFactory XAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory jmx: org.jboss.jmx.server.JMXAdaptorImpl UILXAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory RMIXAQueueConnectionFactory: org.jbossmq.SpyXAQueueConnectionFactory RMIQueueConnectionFactory: org.jbossmq.SpyQueueConnectionFactory ejb20-statelessSession-TraderHomessss: $Proxy3 external: org.jnp.interfaces.NamingContext XATopicConnectionFactory: org.jbossmq.SpyXATopicConnectionFactory _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-user
