users@glassfish.java.net

Re: EJB 3.1 Embedded

From: Alexis Moussine-Pouchkine <alexis.moussine-pouchkine_at_oracle.com>
Date: Sun, 17 Oct 2010 13:35:11 +0200

how do you run this?
-Alexis

On 17 oct. 2010, at 13:51, glassfish_at_javadesktop.org wrote:

> Hello to everyone,
>
> Just donwloaded latest GlassFish 3.1 build 22 hoping that it will resolve the issue of:
>
> The following providers:
> org.glassfish.ejb.embedded.EJBContainerProviderImpl
> Returned null from createEJBContainer call.
>
> But it did not - same error. :( Should I raise a bug? Here is what I try to do:
>
>
> package com.eugen.java6.ee.ejb31.EmbeddableAPI;
>
> import java.io.File;
> import java.util.HashMap;
> import java.util.Map;
>
> import javax.ejb.embeddable.EJBContainer;
> import javax.naming.NamingException;
>
> public class TestTheEJB {
>
> private static Person person;
> public static void main(String ... args){
>
> EJBContainer ejbContainer = EJBContainer.createEJBContainer();
> try {
> System.out.println("Testing");
> person = (Person) ejbContainer.getContext().lookup("java:global/EJB3.1/Person");
> System.out.println("Din the result pass? " + new TestTheEJB().testName());
> ejbContainer.close();
> } catch (NamingException e) {
> e.printStackTrace();
> }
> }
> public boolean testName(){
> return "SomeName".equals(person.getPersonName());
> }
> }
>
> Thanks a lot,
> Eugene.
> [Message sent by forum member 'wind57']
>
> http://forums.java.net/jive/thread.jspa?messageID=485362
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>