[QUESTION] embedding OpenJMS into OpenEJB

"Daniel S. Haischt" <[email protected]>
Newsgroups gmane.comp.java.openjms.devel
Message-ID <[email protected]>
hello,

i currently try to embedd OpenJMS into OpenEJB.
to do so, i am using the EmbeddedJmsServer class.

i set the following environment variables before
instantiating the EmbeddedJmsServer class.

 -> openjms.home = g:\projects\openejb.head
 -> java.security.manager
 -> java.security.policy = g:\projects\openejb.head\openjms.policy

as a configuration file i am using the file named
'rmi_jms.xml' from the openjms-0.7.2 distribution.

below is a code snipet which demonstrates how i try
to instantiate the OpenJMS embedded server.

--------8<--------------8<-------------8<-------------8<----------

Class providerClass = Thread.currentThread().getContextClassLoader()
    .loadClass(JMSProvider.OPENJMS_IMPLEMENTATION_CLASS);

SafeToolkit toolkit = SafeToolkit.getToolkit("MDBContainer");
SafeProperties safeProps = toolkit.getSafeProperties(properties);

confFile = System.getProperty("openejb.home") +
    File.separator +
    "conf" +
    File.separator +
    safeProps.getProperty("ConfigurationFile");

System.setProperty("openjms.home", System.getProperty("openejb.home"));
System.setProperty("java.security.manager", "");
System.setProperty("java.security.policy",
System.getProperty("openejb.home") +
                                           File.separator + "conf" +
                                           File.separator +

safeProps.getProperty("PolicyFile"));

paramTypes[0] = new String().getClass();
paramValues[0] = confFile;

ctor = providerClass.getConstructor(paramTypes);

Thread thread = new Thread((Runnable) ctor.newInstance(paramValues));
thread.run();

-------->8-------------->8------------->8------------->8----------

unfortunatly i am getting the following error message:

--------8<--------------8<-------------8<-------------8<----------

15:03:50.345 ERROR [main] - Failed to initialise JNDI
org.exolab.jms.jndi.FailedToInitialiseJndiServerException:
Exception in RmiJndiServer.<init> java.security.AccessControl
Exception: access denied
(java.net.SocketPermission 127.0.0.1:1099 connect,resolve)
at org.exolab.jms.jndi.rmi.RmiJndiServer.init(Unknown Source)

-------->8-------------->8------------->8------------->8----------

am i getting this error because the policy file wont be found?


With best regards / Mit freundlichen Gruessen

Daniel S. Haischt IT Consulting
______________________________
[revolutionary and alpha geek]

Daniel S. Haischt
Grabenstrasse 11
D-71083 Herrenberg
G E R M A N Y

FON:      +49 -7032-992909
          +49 -700-DHAISCHT
FAX:      +49 -7032-992910
CELLULAR: +49 -172-7668936

email: daniel.haischt-hoJv8xZXk1pvCozZ2bxHoQA08x+/[email protected]
web:   http://www.daniel-s-haischt.biz

-----BEGIN GEEK CODE BLOCK-----
Version: 3.12
GCS dx s:- a- C++ UB++++ P+++ L++++ E W+++ N+++ o-- K- w---
O++ M++ V- PS+ PE++ Y+ PGP++ t+++ 5+ X+++ R+ tv++ b+++ DI+ D+++
G e++ h-- r+ y+++++
------END GEEK CODE BLOCK------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.