[jboss-user] [JNDI and Naming] - Re: EJB 3.1 Global JNDI names

Süleyman Vurucu do-not-reply at jboss.com
Thu Jan 13 07:24:05 EST 2011


Süleyman Vurucu [http://community.jboss.org/people/suikast42] created the discussion

"Re: EJB 3.1 Global JNDI names"

To view the discussion, visit: http://community.jboss.org/message/580600#580600

--------------------------------------------------------------
I post the important part of my Arquillian TestCase. 

The deployment and the injection works wonderfull. But the lookup still fails.  I start the thestcase with the jbossas-remote-6 profile

    @Deployment
    public static JavaArchive createTestArchive() {
        JavaArchive arch = ShrinkWrap.create( JavaArchive.class, "test.jar" )
        .addPackages( true,UserBean.class.getPackage()) // All EJB's
        .addPackages( true, Customer.class.getPackage()) // All Entities
        .addPackages( true,UserInContainerTestCase.class.getPackage()) // all Test Classes
//        .addClasses( UserInContainerTestCase.class, UserBeanRemote.class, UserBean.class, User.class, DBObject.class, UserIssueRole.class)
//        .addClasses( UserInContainerTestCase.class, UserBeanRemote.class) 
         .addManifestResource(EmptyAsset.INSTANCE, ArchivePaths.create("beans.xml"));
        return arch;
    }

     @After
     public void beforeTest(){
         try {
                 InitialContext pJndiContext = new InitialContext();
                NamingEnumeration<NameClassPair> nEn = pJndiContext.list( "java:global" );
                sLog.debug( "LIST" );
                while (nEn.hasMoreElements()) {
                    sLog.debug( nEn.next() );
                }
            } catch (Exception e1) {
                sLog.error( "ERROR",e1 );
            }
     }

     @EJB
    private UserBeanRemote    ub;

    @Test
    public void testTest(){
        Assert.assertNotNull( ub );
        sLog.info( "OK" );
    }
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/580600#580600]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110113/f928061a/attachment.html 


More information about the jboss-user mailing list