On Sun, Jul 3, 2011 at 12:46 AM, Anjana Fernando <anj...@wso2.com> wrote:
> Hi,
>
> There is a bit of a strange issue with the "CarbonInitialJNDIContext" based
> implementation. The issue I got is like, after like service deployment and
> all in a server like DSS or ESB, some of the JNDI lookups fail. For example,
> for DSS, the JNDI lookup to get the TransactionManager instance works fine
> when the service is starting up, but it will fails if you again do you a
> hotdeployment/hotupdate after the server starts up. Same is with the ESB,
> where it's Transaction mediator cannot be used at all, since it does the
> JNDI lookup for the TransactionManager when a request is coming, so it fails
> always. And also, defining data sources using Tomcat also doesn't work due
> to this.
>
> I debugged the code in "CarbonContextHolder" a bit, and found out the
> problem is with how the line "Context urlContext =
> NamingManager.getURLContext(scheme,
> initialContext.getEnvironment()); works. Here
> "initialContext.getEnvironment()" returns an empty Hashtable where it should
> actually return some info (the initial context factory class and all, as I
> remember). So basically what happens is, in the class
> "CarbonInitialJNDIContextFactory", in the method "getInitialContext", when
> you said, "factory.getInitialContext(h)", the h is Hashtable, somehow
> internally, it empties out this Hastable, so later when you try to check it
> values, you get that empty Hashtable. So I modified the code to retain the
> original values, and now it is working without any problems. I'm attaching
> the modified "CarbonContextHolder.java" here, somehow please review it and
> let me know if it's OK.

Hi Anjana,

Any idea, which call causes CarbonInitialJNDIContextFactory to pass an
empty hash table ?

Thanks
AmilaJ

>
> Another thing to note is, the ESB has the geronimo-jta lib. This causes
> Atomikos to not to work properly, since the JDK also has these libs, and you
> will ultimately get an ClassCastException. So I simply deleted this jar and
> it worked without any issues.
>
> Cheers,
> Anjana.
>
> --
> Anjana Fernando
> Senior Software Engineer
> WSO2 Inc. | http://wso2.com
> lean . enterprise . middleware
>
> _______________________________________________
> Carbon-dev mailing list
> Carbon-dev@wso2.org
> http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev
>
>
_______________________________________________
Carbon-dev mailing list
Carbon-dev@wso2.org
http://mail.wso2.org/cgi-bin/mailman/listinfo/carbon-dev

Reply via email to