you must be trying to access it as java:/poolname.
You can access it under the global namespace. i.e. if you poolname is OracleDS then it is in the global namespace as "OracleDS" and you can do the following. Assuming you have an initial Context (ctx).
DataSource ds = (DataSource)ctx.lookup("OracleDS");
> I am able to configure a Connection pool for oracle.
> However I have problems in accessing this connection
> from a program running in a different JVM (different
> from JBOSS JVM).
That Won't Work. I know that WebLogic lets you do this; that doesn't make it a good idea.
> DataSource ds = (DataSource)ctx.lookup("OracleDS");
OK. Try this in JBoss. This won't even work in the same process.
in Weblogic or Jboss? I have used it in Jboss (well in a client calling Jboss). as long as OracleDS is in the global namespace of course. (or whatever the DS is named). It works in the same VM or from external VM.
If it works from another process with oracle, you're lucky, and not using the JBoss pools. Jboss's pools are neither serializable nor remote. You can't call them from another process.
I have tried it in JBOSS. It does not work.
It works ok in Weblogic.
It isn't supposed to work in JBoss. It will not be supported in JBoss (until someone builds a client-container, at any rate - and nobody is even talking about doing that).