-
1. Re: MSSqlServer datasource configuration
djeanprost Jan 8, 2004 7:51 AM (in response to djeanprost)in my config, I forgot to mention that I setup the user password :
-
2. Re: MSSqlServer datasource configuration
milowe Jan 8, 2004 8:28 AM (in response to djeanprost)Do you get an exception when you try to get a connection from the DataSource or whats the problem?
-
3. Re: MSSqlServer datasource configuration
darranl Jan 8, 2004 8:30 AM (in response to djeanprost)It is a while since I have looked at the initialisation of connection pools but I suspect that your connection will not be created until the first time it is actually requested.
Your min-pol-size value will then just stop the connection pool size from dropping below 1. -
4. Re: MSSqlServer datasource configuration
djeanprost Jan 8, 2004 9:10 AM (in response to djeanprost)"darranl" wrote:
It is a while since I have looked at the initialisation of connection pools but I suspect that your connection will not be created until the first time it is actually requested.
Your min-pol-size value will then just stop the connection pool size from dropping below 1.
Well, that is was I was about to test. I was just wondering if the connections would only be created after the first request.
I have to say, this behaviour could be documented.
Now I'm going to try to get a connection and use query to verify our assertion.
thx.
dom -
5. Re: MSSqlServer datasource configuration
djeanprost Jan 8, 2004 10:00 AM (in response to djeanprost)When running the following code from netbeans,
Properties properties = new Properties();
properties.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
properties.put(Context.PROVIDER_URL, "jnp://ucdjp:1099");
Context initialContext = new InitialContext(properties);
DataSource ds = (DataSource)initialContext.lookup("java:/sofaxis");
I now get
javax.naming.NameNotFoundException: sofaxis not bound
at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:133)
at org.jnp.server.NamingServer_Stub.lookup(Unknown Source)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:528)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:507)
at javax.naming.InitialContext.lookup(InitialContext.java:347)
at test.TestJBoss.main(TestJBoss.java:40)
Maybe I make a mistake when looking for java:/sofaxis, or my datasource isn't well deployed
Can someone help me ?
regards,
dom -
6. Re: MSSqlServer datasource configuration
djeanprost Jan 8, 2004 10:41 AM (in response to djeanprost)Well, after a few post search, it seems JBoss doesn't allow to get a DataSource outside of its VM.
It's not easy to check if my DataSource is deployed.