I'm trying to do this

contextProperties = 
                new Properties(); 
        contextProperties.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.core.LocalInitialContextFactory"); 
        contextProperties.put("openejb.deployments.classpath.ear", "true"); 
        contextProperties.put("postgresDatabase",
"new://Resource?type=DataSource"); 
        contextProperties.put("postgresDatabase.JdbcDriver",
"org.postgresql.Driver"); 
        contextProperties.put("postgresDatabase.JdbcUrl",
"jdbc:postgresql://localhost:5432/aomdb"); 
        contextProperties.put("postgresDatabase.JtaManaged", "true");     
        

EJBContainer container = 
   javax.ejb.embeddable.EJBContainer.createEJBContainer(contextProperties); 
context = 
               container.getContext(); 
userDao = 
                (UserProfileDaoLocal) context.lookup("UserProfileDaoLocal"); 

Not sure if is the new way you are pointing to.

I've looking for the provider IIRC you said and I couldn't find any
documentation relative to that or any link  related on how to test it.

The only thing I've found is this link
http://docs.oracle.com/javaee/6/api/javax/ejb/embeddable/EJBContainer.html

But not sure how to specify the provider.

Regards,
Antonio



--
View this message in context: 
http://openejb.979440.n4.nabble.com/Impossible-to-instantiate-a-container-tp4660887p4661385.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to