You might have created database connections only in the current EGL program; but to provide the connection detail, you pass the object to the native Java code. This sharing mechanism works in whatever way you access the native Java code; whether by way of an external type or by way of a Java access function that is provided in the JavaLib system library.
JavaLib.getSharedResourcePowerServer returns an object that has access to all database connections available to the EGL program.
For details on the external type, see "SharedResourcePowerServer." For other details on how to use the Java class in your native Java code, see "Java wrapper classes."
javaLib.getSharedResourcePowerServer()
returns (SharedResourcePowerServer)