how to access datasource in geronimo via jndi by remote client application

StackOverflow https://stackoverflow.com/questions/18314422

  •  25-06-2022
  •  | 
  •  

Вопрос

I have created a datasource in geronimo server. I'm able to connect it via admin console.

Can anyone let me know how to connect to this datasource by external standalone application via jndi.

Specifically i'm not sure about these following values :

java.naming.factory.initial=TO_BE_CHANGED_BY_USER 
java.naming.factory.object=TO_BE_CHANGED_BY_USER 
java.naming.factory.state=TO_BE_CHANGED_BY_USER 
java.naming.factory.control=TO_BE_CHANGED_BY_USER 
java.naming.factory.url.pkgs=TO_BE_CHANGED_BY_USER 
java.naming.provider.url=TO_BE_CHANGED_BY_USER 
java.naming.dns.url=TO_BE_CHANGED_BY_USER 

And also which jar should be included for this to work ??

Это было полезно?

Решение

It's answered here . http://apache-geronimo.328035.n3.nabble.com/jndi-properties-for-datasource-tp3987125p3987127.html

Geronimo datasources/database pools are designed to only be accessed in the same VM as they are deployed in. You cannot look up a database pool deployed in geronimo from another VM no matter how you configure the remote jndi. One reason for this is that we don't have a distributed transaction manager and certainly couldn't come up with a correctly configured transaction manager in the remote vm through a jndi lookup.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top