Datasource can be called in java client,applet,jsp
> Datasource can be called in java client,applet,jsp
How? I keep receiving the same "not bound error" if I try to access it from a java client. The only one that has worked to me was to access it from an EJB.
> How? I keep receiving the same "not bound error" if I
> try to access it from a java client. The only one
> that has worked to me was to access it from an EJB.
The same problem. Actually I was able to access datasource from any place INSIDE the server: another ear, war, servlet etc. Could anybody explain how to get it from client?
The same problem... even with JBoss 3.0.4.
This is really a pain! Any solution? I don't want to create a separate connection pool for remote applications!
you should be able to do this without a problem.
Are you doing the lookup from 'new InitialContext()'? If so this will only work 'inside' the server as you saw.
To do it from outside you will need to do something like:
java.util.Hashtable props = new java.util.Hashtable();
// Get the initial context with given properties
Context context = new InitialContext(props);
Then do context lookups.
Hope this helps you
I'm having the same problem about accessing data source from a client program. So I took your suggestion by adding the following to the jndi.properties:
Unfortunately I'm still getting the same db_source not bound error. Any insights?
I know there isn't a lot of value in a me too post, but I have pretty much the same problem. To try and understand why I wrote a simple Java Client that creates an InitialContext and then lists all objects bound to both "" and "java:". When I run this client outside of JBoss I get two identical lists. If I then take the code and put in a JSP and run the JSP from within JBoss I get two different lists. (Which is what I would expect). I also have the same problem as the previous posts, I can not get the default datasource from the Java Client but I can get it from the JSP.
Is it my lack of understanding, a misconfiguration or is this the way it is supposed to be?
For the Java client I use the aforementioned properties in my jndi.properties, for the JSP I do not provide any configuration and just take whatever is configured within JBoss. Not that I think it matters, but the JSP is running inside Jetty.