I think I have successfully created a connection pool for MS SQL 2000... but I can't connect to it from my test client code...
 
When JBoss starts up, I get output like below...
[XADataSourceLoader] Starting                                               
[SQLServerPool] XA Connection pool SQLServerPool bound to java:/SQLServerPool
[XADataSourceLoader] Started
 
It seems like JBoss was able to create the connection pool successfully...
 
However, when I run my client code below, I get an error message saying, "javax.naming.NameNotFoundException: SQLServerPool not bound
        at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(Unknown Source)
        at sun.rmi.transport.StreamRemoteCall.executeCall(Unknown Source)
        at sun.rmi.server.UnicastRef.invoke(Unknown Source)
        at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:349)
        at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:333)
        at javax.naming.InitialContext.lookup(Unknown Source)
        at DataSourceTest.main(DataSourceTest.java:37)"
 
What am I doing wrong?
 
Here is the sample code...
 
            env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
            env.put(Context.PROVIDER_URL, "localhost:1099");
            javax.naming.Context ctx = new InitialContext(env);
            DataSource ds = (DataSource) ctx.lookup("SQLServerPool"); // I tried with java:/SQLServerPool, still didn't work
            Connection con = ds.getConnection();
 
Can someone help?
 
Thanks, in advance...
 
================================
Yong T. Kim (kimion.com)
Software Developer
[EMAIL PROTECTED]
http://www.kimion.com:8080
 
 

Reply via email to