The -D doesn't seem to be the problem. There must be some other magic thing
that's missing.
I'm now just trying the TestBeanClient job that comes with jBoss using -D.
o Running locally on Win NT, everything works fine.
o Running remote from Win NT to Win NT using the -D. I get the following:
_____________________________________________
jBoss, the EJB Open Source Server
Copyright (C), The jBoss Organization, 2000
_____________________________________________
Welcome to the test Suite v1.2
_____________________________________________
1- Trying the context...OK
Test Stateless Bean
===================
2- Looking up the home
nextgen.StatelessSession...javax.naming.ServiceUnavailableException: Connection
refused: no furth
er information. Root exception is java.net.ConnectException: Connection
refused: no further information
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:312)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:125)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:112)
at java.net.Socket.<init>(Socket.java:273)
at java.net.Socket.<init>(Socket.java:100)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:88)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:617)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:272)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:265)
at javax.naming.InitialContext.lookup(InitialContext.java:350)
at
org.jboss.zol.testbean.client.EjbossClient.doSomeTesting(EjbossClient.java:75)
at
org.jboss.zol.testbean.client.EjbossClient.main(EjbossClient.java:783)
-----------------------------------------------------------------------------+
I've tried putting the -Ds at the front, at the back and both ways. I've tried
leaving out the java.naming.factory.initial, and leaving it in.
There must be something else missing.
Here's the bat file:
=================================================
@echo off
REM This line should be set up correctly by the build process
set JDK=JDK.VER
REM This line should be set up correctly by the build process
set VERSION=PROD.VER
REM all clients need this
set CP=../client/ejb.jar
set CP=%CP%;../client/jndi.jar
set CP=%CP%;../client/jta-spec1_0_1.jar
set CP=%CP%;../client/jboss-client.jar
set CP=%CP%;../client/jnp-client.jar
set CP=%CP%;..
REM only the test client needs the following
set CP=%CP%;../client/TestBeanClient.jar
set CP=%CP%;.;..;../client/AccountClient.jar
K:\programs\jdk13\bin\java -cp %CP% -Djava.naming.provider.url=206.233.214.240
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
org.jboss.zol.testbean.client.EjbossClient
-Djava.naming.provider.url=206.233.214.240
-Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
Any help appreciated.
Regards,
Rich Katz
=======================================
Rickard Oberg wrote:
> Hey
>
> > Ken Jenks writes:
> > >
> System.setProperty("java.naming.factory.initial","org.jnp.interfaces.NamingC
> ontextFactory");
> > >
> System.setProperty("java.naming.provider.url","206.233.214.192:1099");
> > >
> > > InitialContext jndiContext = new InitialContext();
> >
> > AAAAAARRRRRGGGGGHHHHH! Hard coded string constants!
>
> Yeah, agree. Not good.
>
> > > You can skip setting the System properties if you launch your client
> with a
> > > command line something like this:
> > > java -classpath (whatever)
> > > -Djava.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
> > > -Djava.naming.provider.url=206.233.214.192:1099 RemoteTest
> >
> > Better...
>
> Yes, but why don't people use jndi.properties??? That seems so much better
> to me.
>
> /Rickard
>
> --
> --------------------------------------------------------------
> To subscribe: [EMAIL PROTECTED]
> To unsubscribe: [EMAIL PROTECTED]
> Problems?: [EMAIL PROTECTED]
--
--------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Problems?: [EMAIL PROTECTED]