users@glassfish.java.net

EJB 3.1 Embedded

From: <glassfish_at_javadesktop.org>
Date: Sun, 17 Oct 2010 04:51:05 PDT

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