Hi, MirekSz.

I had the same problems with my project. I found a solution for it, but
Im using both openejb.xml and jndi.properties

openejb.xml
<?xml version="1.0"?>
<openejb>
        <Deployments dir="ejbs/" /> <!-- relative to my openejb.home
path -->
</openejb>

jndi.properties
java.naming.factory.initial=org.apache.openejb.client.LocalInitialContex
tFactory
openejb.deployments.classpath.filter.descriptors=true
openejb.deployments.classpath.exclude=.*
openejb.deployments.classpath.include=


My startup code.... EjbServer.java...
.
.
.
@Override
public void start() {
.
.
.
try {
final ClassLoader loader;
loader = EjbServer.class.getClassLoader();
Properties prop = new Properties();
prop.load(loader.getResourceAsStream("jndi.properties"));

//Getting the openejb.xml file
File openejbXmlFile = FileUtils.getFile(SystemParams.tempFolder, config)
prop.put("openejb.configuration", openejbXmlFile.getAbsolutePath());
this.ctx = new InitialContext(prop);
} catch (Exception e) {
        throw new SystemException(e); //My custom exception
}               
.
.
.
}

Try it... its working for me.

[]s,
Thiago.

-----Original Message-----
From: MirekSz [mailto:[email protected]] 
Sent: Sunday, April 18, 2010 4:00 AM
To: [email protected]
Subject: Deployments dir in embedded


Hello,
I can configure deployments dir in openejb.xml by

<openejb>
...

<Deployments dir="c:\myapp\acmeEjbs" />
</openejb>

but how I can do it via system properties 

Properties properties = new Properties();
properties.setProperty(Context.INITIAL_CONTEXT_FACTORY,org.apache.openej
b.client.LocalInitialContextFactory");
properties.put("deployments.dir", "c:\myapp\acmeEjbs");
InitialContext initialContext = new InitialContext(properties);

this is dosen't works

Please help my how to configure.
And second question 
How can I turn off Application discovery via the classpath. Beacause I
know
dir of my ejbs??

Best regards
-- 
View this message in context:
http://n4.nabble.com/Deployments-dir-in-embedded-tp2014699p2014699.html
Sent from the OpenEJB Dev mailing list archive at Nabble.com.

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 9.0.801 / Virus Database: 271.1.1/2810 - Release Date: 04/19/10
02:31:00

Reply via email to