-
1. Re: Defining / accessing a data source in JBoss3.0 beta
davidjencks Feb 25, 2002 5:46 PM (in response to per_nyfelt)I think the log you show indicates that the datasource is successfully deployed and bound in jndi. Check in jndi view to see what it is bound under. Check the connectionfactoryloader mbean (not the jsr-77 one) to make sure all the properties are as you expect and that it is started.
I think there is a naming problem, which I usually get confused with. Have you tried java:/resnet? -
2. Re: Defining / accessing a data source in JBoss3.0 beta
per_nyfelt Feb 28, 2002 9:53 AM (in response to per_nyfelt)Thanks for the quick reply. Using java:/resnet in the jbosscmp-jdbc works for the entity beans :).
I still cannot find the datasource with a straight JNDI though, if I do:
Hashtable props = new Hashtable();
props.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
props.put(Context.PROVIDER_URL, "localhost:1099");
Context ctx = new InitialContext(props);
Object obj = ctx.lookup("resnet");
I get javax.naming.NameNotFoundException: resnet not bound
I've also tried java:/resnet, java:comp/env/resnet and any other combination i could think of.
In the jboss.jca:service=ConnectionFactoryLoader,name=resnet the JndiName has the value resnet so I do not understand why i cant find such an object in JNDI bound as resnet. I must be missing something.
Any ideas would be much appreciated. -
3. Re: Defining / accessing a data source in JBoss3.0 beta
davidjencks Feb 28, 2002 6:57 PM (in response to per_nyfelt)Since you are trying to set props for your initial context, maybe you are trying to get the datasource from another vm. YOU CANT, STOP TRYING. The java: namespace is accessible only from in-vm. I assume you know about jndiview accessible on port 8082?
-
4. Re: Defining / accessing a data source in JBoss3.0 beta
per_nyfelt Mar 1, 2002 8:12 AM (in response to per_nyfelt)Oh, I didn't know that. This explains why my Junit tests are failing even though it actually works. I'll switch to Cactus for those tests instead. Thanks for the information :)
Best regards,
Per