3 Replies Latest reply on Oct 28, 2003 2:51 PM by kuato

    No Nested InitalContext in jboss???

    kuato Newbie

      Hi.

      I'm just screwing around with Jboss and ran into a bit of a problem, well, not really a problem, just trying to see if this is a 'feature' a 'bug' or determine if my code is whacked.

      I deployed an EntityBean and then created a test program to test the entitybean. No worries, it looks up the bean name ok in the naming service, connects to the database, does some stuff....whatever.

      Now, when I go into the ejbCreate() method and add another

      InitialContext context = new InitialContext(props)

      I get a

      javax.ejb.CreateException: Could not obtain an InitialContext.

      Can you not nest these types of calls? Ie can you not call a bean that gets a context, that calls a bean that gets a context, that calls a bean that gets a context etc?

      The props in the testclient and the bean are identical as it was just a cut and paste job, so why is it failing to get the Context?