I've modified the FakeInitialContext stuff so that you can now bind things to names 
like: java:/ConnectionFactory

What was needed was an InitialContextFactoryBuilder to make sure that the 
FakeInitialContext gets used rather than the "normal" InitialContext.

The way you set up things in the FakeInitialContext has changed from:

    HashMap bindings = new HashMap();
  |     bindings.put("somename", myobj);
  |     bindings.put("othername", myobj2);
  |     FakeInitialContext.setBindings(bindings);
to:
   InitialContext ctx = new InitialContext();//The jndi.properties file + ICFBuilder 
makes sure the FakeInitialContext gets used
  |    ctx.bind("somename", myobj);
  |    ctx.bind("othername", myobj2);

If you use the first method (calling FakeInitialContext directly), you end up with two 
versions of the static bindings HashMap contained in FakeInitialContext in some cases 
for some bizarre reason. This happened in TestCmdSTARTTLS.

So far FakeInitialContext overrides the lookup(), bind(), rebind() and 
getDefaultInitialCtx() methods inherited from InitialContext(), there are a few others 
that might need overriding down the line if we run into any more problems.

Cheers,

Kab

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3830302#3830302

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3830302


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to