You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by Benjamin Graf <be...@gmx.net> on 2012/09/04 08:41:04 UTC

Fwd: Issue with JndiContext in camel tests

Hi,

I got no feedback to this issue, yet. Any suggestions?

Benjamin

-------- Original Message --------
Subject: 	Issue with JndiContext in camel tests
Date: 	Tue, 21 Aug 2012 21:18:18 +0200
From: 	Benjamin Graf <be...@gmx.net>
Reply-To: 	dev@camel.apache.org
To: 	dev@camel.apache.org



Hi,

I had a lot of troubles with JndiContext in camel junit tests. I recognized that
if you configure the jndiregistry in the unit test produced by
CamelInitialContextFactory you'll always will get a new one if any library in
between with do a new InitialContext() call. Thats why I created a simple
threadsafe mock for easy use in unit tests.

Maybe anybody can create a jira issue and put it to trunk. I would consider
adding to camel-test component fits best. Maybe a last minute change for 2.10.1?

Best regards
Benjamin




Re: Issue with JndiContext in camel tests

Posted by Benjamin Graf <be...@gmx.net>.
Hi Christian,

I opened an issue in JIRA (https://issues.apache.org/jira/browse/CAMEL-5611) .
Test case and fix are added as attachment.

Best regards,
Benjamin

On 04.09.2012 23:00, Christian Müller wrote:
> Hello Benjamin!
>
> Sorry for the late reply. Most of us were in vacation in the last weeks...
> Could you also provide a unit test which shows your issue? You can create
> an issue at [1]. You can read more about how to contribute at [2].
>
> [1] https://issues.apache.org/jira/browse/CAMEL
> [2] http://camel.apache.org/contributing.html
>
> Best,
> Christian
>
> On Tue, Sep 4, 2012 at 8:41 AM, Benjamin Graf <be...@gmx.net> wrote:
>
>>  Hi,
>>
>> I got no feedback to this issue, yet. Any suggestions?
>>
>> Benjamin
>>
>> -------- Original Message --------  Subject: Issue with JndiContext in
>> camel tests  Date: Tue, 21 Aug 2012 21:18:18 +0200  From: Benjamin Graf
>> <be...@gmx.net> <be...@gmx.net>  Reply-To:
>> dev@camel.apache.org  To: dev@camel.apache.org
>>
>>
>> Hi,
>>
>> I had a lot of troubles with JndiContext in camel junit tests. I recognized that
>> if you configure the jndiregistry in the unit test produced by
>> CamelInitialContextFactory you'll always will get a new one if any library in
>> between with do a new InitialContext() call. Thats why I created a simple
>> threadsafe mock for easy use in unit tests.
>>
>> Maybe anybody can create a jira issue and put it to trunk. I would consider
>> adding to camel-test component fits best. Maybe a last minute change for 2.10.1?
>>
>> Best regards
>> Benjamin
>>
>>
>>
>>
>
> --
>


Re: Issue with JndiContext in camel tests

Posted by Christian Müller <ch...@gmail.com>.
Hello Benjamin!

Sorry for the late reply. Most of us were in vacation in the last weeks...
Could you also provide a unit test which shows your issue? You can create
an issue at [1]. You can read more about how to contribute at [2].

[1] https://issues.apache.org/jira/browse/CAMEL
[2] http://camel.apache.org/contributing.html

Best,
Christian

On Tue, Sep 4, 2012 at 8:41 AM, Benjamin Graf <be...@gmx.net> wrote:

>  Hi,
>
> I got no feedback to this issue, yet. Any suggestions?
>
> Benjamin
>
> -------- Original Message --------  Subject: Issue with JndiContext in
> camel tests  Date: Tue, 21 Aug 2012 21:18:18 +0200  From: Benjamin Graf
> <be...@gmx.net> <be...@gmx.net>  Reply-To:
> dev@camel.apache.org  To: dev@camel.apache.org
>
>
> Hi,
>
> I had a lot of troubles with JndiContext in camel junit tests. I recognized that
> if you configure the jndiregistry in the unit test produced by
> CamelInitialContextFactory you'll always will get a new one if any library in
> between with do a new InitialContext() call. Thats why I created a simple
> threadsafe mock for easy use in unit tests.
>
> Maybe anybody can create a jira issue and put it to trunk. I would consider
> adding to camel-test component fits best. Maybe a last minute change for 2.10.1?
>
> Best regards
> Benjamin
>
>
>
>


--