I have the need to make an RMI call originating from inside the jboss container (a StatelessSessionBean) to a remote jboss instance. My first attempt failed because there is no SecurityManager installed so I couldn't do any RMI classloading. So, I'm on the track of running with a security manager installed.
running a default jboss instance with
JAVA_OPTS="-Djava.security.manager -Djava.security.policy=server/default/conf/server.policy" bin/run.shappears to startup fine. (BTW, installing a Security Manager programmatically seems to give me all the same results)
When I get to the RMI logic, the calls succeed when a SecurityManager is installed.
However, when I try to do *any* JDBC (via a configured Oracle *or* MSSQL Datasource), I get weird and apparently unsolvable exceptions.
The first exception received when using either MSSQL or Oracle JDBC datasources, is a ClassNotFoundException on
org/jboss/resource/adapter/jdbc/PrivilegedProxy.class. So, looking in some jars and jboss-3.2.4 distros, I notice that the particular class is compiled but not in any distro jars. So, as a hack, I jar up two proxy related classes and stick them in my server/default/lib directory.
The next levels of exceptions differ.
Under Oracle (jar ojdbc14.jar), I get this...
RuntimeErrorException: java.lang.IllegalAccessError: class oracle.jdbc.driver.$Proxy147 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
Cause: java.lang.IllegalAccessError: class oracle.jdbc.driver.$Proxy147 cannot access its superinterface oracle.jdbc.driver.ScrollRsetStatement
Under MSSQL (not sure which JDBC driver, sorry), I get this...
Throwable while attempting to get a new connection: null
org.jboss.resource.JBossResourceException: Could not create connection; - nested throwable: (java.sql.SQLException: Failed to create Connection proxynull)
My round about point is,... what am I doing wrong with Security Manager with regard to JDBC. I am assuming that somewhere out there, someone has done what I am trying to do. It doesn't appear that unique.
Any help would be greatly appreciated.