Just to have a little better context, you want to go from your local tomee instance to a remote OpenEJB instance running in a separate JVM?
On Fri, May 17, 2013 at 7:08 AM, Caroline <caroline.van.den.ha...@gmail.com>wrote: > Hi, > > Romain already helped me tremendously on > > http://openejb.979440.n4.nabble.com/Location-of-jar-bean-so-it-s-seen-by-CDI-td4662777.html > . > I tried to have CDI look for newly added .jars after deployment. I > understand now that's not what CDI does. However, I need to build in this > scanning for .jars anyways, using other JEE techniques such as EJB. I'm > _very_ short in time and I'm struggling. I hope someone can help. > > > I have a WebService that is called from a PhoneGap client: > > @Path("request") > @RequestScoped > public class RequestResource { > > @Context > private UriInfo context; > > public RequestResource() { > } > > @POST > @Path("post") > @Consumes("application/json") > public Response postJson(String content) { > AreeConfiguration config = codeThatMakesConfig(); > config.refreshEJB(); > (code that makes output) > return Response.status(201).entity(output.toString()).build(); > } > } > > and my AreeConfiguration class in which I'm now just trying to get past > Exceptions but where I - eventually - will want to load all implementations > of AreeInput I can get from either within the webapplication or .jars (or > other bundles) in a folder somewhere on the TomEE server: > > @Default > public class AreeConfiguration { > public AreeConfiguration(){ > } > > public void refreshEJB() throws NamingException{ > System.out.println("Server: going the EJB route"); > Properties properties = new Properties(); > properties.setProperty("openejb.embedded.remotable", "true"); > properties.setProperty("openejb.validation.output.level ", " > medium"); > Context ctx = > EJBContainer.createEJBContainer(properties).getContext(); > //"javax.ejb.EJBException: Provider error. No provider definition > found" happens above this line. > System.out.println(ctx.getNameInNamespace()); > } > } > > I've been through > http://openejb.979440.n4.nabble.com/ejb-from-ws-td4470387.html and both > TomEE examples as well as the example Romain gives work in newly created > projects. > > > I'm using TomEE+ 1.6.0-SNAPSHOT from May 13. > I have the following (amongst other things) in my pom.xml: > > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>javaee-api</artifactId> > <version>6.0-4</version> > </dependency> > <dependency> > <groupId>org.apache.openejb</groupId> > <artifactId>tomee-embedded</artifactId> > <version>1.0.0</version> > <scope>test</scope> > </dependency> > <dependency> > <groupId>javax</groupId> > <artifactId>javaee-api</artifactId> > <version>6.0</version> > <scope>provided</scope> > </dependency> > > <pluginRepositories> > <pluginRepository> > <id>apache.snapshots</id> > <url>http://repository.apache.org/snapshots/</url> > </pluginRepository> > </pluginRepositories> > > Thanks so much. > > > > -- > View this message in context: > http://openejb.979440.n4.nabble.com/EJBContainer-No-provider-definition-found-tp4663028.html > Sent from the OpenEJB User mailing list archive at Nabble.com. >