You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jonathan Gallimore <jo...@gmail.com> on 2017/07/20 08:28:12 UTC

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Thanks Svetlin - I'll review later today. I'm currently getting some
IvmContextTest test failures on master - I'll send over a list. Happy to
help fix these.

Jon

On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <ji...@apache.org>
wrote:

>
>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=
> com.atlassian.jira.plugin.system.issuetabpanels:comment-
> tabpanel&focusedCommentId=16094340#comment-16094340 ]
>
> ASF GitHub Bot commented on TOMEE-2102:
> ---------------------------------------
>
> GitHub user SvetlinZarev opened a pull request:
>
>     https://github.com/apache/tomee/pull/94
>
>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
>
>
>
> You can merge this pull request into a Git repository by running:
>
>     $ git pull https://github.com/SvetlinZarev/tomee fixBindUndbind
>
> Alternatively you can review and apply these changes as the patch at:
>
>     https://github.com/apache/tomee/pull/94.patch
>
> To close this pull request, make a commit to your master/trunk branch
> with (at least) the following in the commit message:
>
>     This closes #94
>
> ----
> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
> Author: Svetlin Zarev <sv...@sap.com>
> Date:   2017-07-20T06:44:11Z
>
>     Add tests that verify the behaviour of IvmContext bind/unbind
>
> ----
>
>
> > IvmContext bind/unbind creates duplicate contexts
> > -------------------------------------------------
> >
> >                 Key: TOMEE-2102
> >                 URL: https://issues.apache.org/jira/browse/TOMEE-2102
> >             Project: TomEE
> >          Issue Type: Bug
> >            Reporter: Svetlin Zarev
> >
> > Imagine you have the flowing context "a/b/object". The context tree can
> be created in two ways:
> > 1. Relative to the root or some
> > {code}
> > IvmContext root = IvmContext.createRootContext();
> > root.bind("a/b/object", new Object);
> > {code}
> > 2. Relative to some node:
> > {code}
> > IvmContext root = IvmContext.createRootContext();
> > root.bind("a", null);
> > IvmContext a = root.lookup("a");
> > a.bind("b", null);
> > IvmContext b = root.lookup("b")
> > a.bind("object", new Object())
> > {code}
> > So when one looks up "object" or "a" or "b" or object, one has to get
> the very same result regardless if the context tree was created by 1 or by
> 2. Yet this is not the case when it comes to the IvmContext. Maybe the most
> obvious (and shocking) issue is that IvmContext allows to bind 2 different
> objects to the same name ! Example:
> > {code}
> >        IvmContext root = IvmContext.createRootContext();
> >         root.bind("a/b/object", new Object());
> >         IvmContext b = (IvmContext) root.lookup("a/b");
> >         //already bound from root -> must fail, yet it does not
> >         b.bind("object", new Object());
> > {code}
> > I've provided various test cases for different combinations of
> bind/unbind/lookup that reproduce the issue.
>
>
>
> --
> This message was sent by Atlassian JIRA
> (v6.4.14#64029)
>

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Posted by Jonathan Gallimore <jo...@gmail.com>.
Thanks for the pointers. I'll recheck my end.

Jon

On 20 Jul 2017 12:56 pm, "Svetlin Zarev" <sv...@gmail.com>
wrote:

> Actually the inner static class Writer does not have a default constructor.
> This was introduced yesterday (commit 5830c209), so maybe it's not that
> critical.
>
> https://issues.apache.org/jira/browse/TOMEE-2099
>
> 2017-07-20 14:45 GMT+03:00 Romain Manni-Bucau <rm...@gmail.com>:
>
> > looks like the class is not packaged in an arquillian war so it is not
> > instantiable. is that an option?
> >
> >
> > Romain Manni-Bucau
> > @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> > <https://blog-rmannibucau.rhcloud.com> | Old Blog
> > <http://rmannibucau.wordpress.com> | Github <https://github.com/
> > rmannibucau> |
> > LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> > <https://javaeefactory-rmannibucau.rhcloud.com>
> >
> > 2017-07-20 13:42 GMT+02:00 Svetlin Zarev <svetlin.angelov.zarev@gmail.
> com
> > >:
> >
> > > Hi,
> > >
> > > The IvmContext arquillian test passes against current master: [1]
> > > The CXF tests fail because of no such method errors:
> > > java.lang.NoSuchMethodException:
> > > org.apache.openejb.server.cxf.rs.AppPropertiesPropagationTest$
> > > Writer.<init>()
> > > Maybe CXF was updated ?
> > >
> > > [1] https://gist.github.com/SvetlinZarev/
> 90d7deb0326e7b670440f0a9a442af
> > 1d
> > >
> > > Kind regards,
> > > Svetlin
> > >
> > > 2017-07-20 14:02 GMT+03:00 Jonathan Gallimore <
> > > jonathan.gallimore@gmail.com>
> > > :
> > >
> > > > Happy to try it again, but here's the tests that were failing for me
> on
> > > > master:
> > > >
> > > > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > > > testListContextTree
> > > > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > > > testContextListBindings
> > > > org.apache.openejb.server.cxf.rs.CustomProviderTest.customProvider
> > > > org.apache.openejb.server.cxf.rs.CustomProviderTest.
> > > customSpecificProvider
> > > > org.apache.openejb.server.cxf.rs.CustomProviderWithConfigTest.config
> > > > org.apache.openejb.server.cxf.rs.DiscoverCustomProviderTest.
> > > customProvider
> > > >
> > > > I haven't as yet dug into the root cause of the test failures. Will
> > > likely
> > > > be this evening before I can do that.
> > > >
> > > > Jon
> > > >
> > > > On Thu, Jul 20, 2017 at 9:28 AM, Jonathan Gallimore <
> > > > jonathan.gallimore@gmail.com> wrote:
> > > >
> > > > > Thanks Svetlin - I'll review later today. I'm currently getting
> some
> > > > > IvmContextTest test failures on master - I'll send over a list.
> Happy
> > > to
> > > > > help fix these.
> > > > >
> > > > > Jon
> > > > >
> > > > > On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <
> > > jira@apache.org>
> > > > > wrote:
> > > > >
> > > > >>
> > > > >>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=com.
> > > > >> atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
> > > > >> l&focusedCommentId=16094340#comment-16094340 ]
> > > > >>
> > > > >> ASF GitHub Bot commented on TOMEE-2102:
> > > > >> ---------------------------------------
> > > > >>
> > > > >> GitHub user SvetlinZarev opened a pull request:
> > > > >>
> > > > >>     https://github.com/apache/tomee/pull/94
> > > > >>
> > > > >>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
> > > > >>
> > > > >>
> > > > >>
> > > > >> You can merge this pull request into a Git repository by running:
> > > > >>
> > > > >>     $ git pull https://github.com/SvetlinZarev/tomee
> fixBindUndbind
> > > > >>
> > > > >> Alternatively you can review and apply these changes as the patch
> > at:
> > > > >>
> > > > >>     https://github.com/apache/tomee/pull/94.patch
> > > > >>
> > > > >> To close this pull request, make a commit to your master/trunk
> > branch
> > > > >> with (at least) the following in the commit message:
> > > > >>
> > > > >>     This closes #94
> > > > >>
> > > > >> ----
> > > > >> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
> > > > >> Author: Svetlin Zarev <sv...@sap.com>
> > > > >> Date:   2017-07-20T06:44:11Z
> > > > >>
> > > > >>     Add tests that verify the behaviour of IvmContext bind/unbind
> > > > >>
> > > > >> ----
> > > > >>
> > > > >>
> > > > >> > IvmContext bind/unbind creates duplicate contexts
> > > > >> > -------------------------------------------------
> > > > >> >
> > > > >> >                 Key: TOMEE-2102
> > > > >> >                 URL: https://issues.apache.org/
> > > jira/browse/TOMEE-2102
> > > > >> >             Project: TomEE
> > > > >> >          Issue Type: Bug
> > > > >> >            Reporter: Svetlin Zarev
> > > > >> >
> > > > >> > Imagine you have the flowing context "a/b/object". The context
> > tree
> > > > can
> > > > >> be created in two ways:
> > > > >> > 1. Relative to the root or some
> > > > >> > {code}
> > > > >> > IvmContext root = IvmContext.createRootContext();
> > > > >> > root.bind("a/b/object", new Object);
> > > > >> > {code}
> > > > >> > 2. Relative to some node:
> > > > >> > {code}
> > > > >> > IvmContext root = IvmContext.createRootContext();
> > > > >> > root.bind("a", null);
> > > > >> > IvmContext a = root.lookup("a");
> > > > >> > a.bind("b", null);
> > > > >> > IvmContext b = root.lookup("b")
> > > > >> > a.bind("object", new Object())
> > > > >> > {code}
> > > > >> > So when one looks up "object" or "a" or "b" or object, one has
> to
> > > get
> > > > >> the very same result regardless if the context tree was created
> by 1
> > > or
> > > > by
> > > > >> 2. Yet this is not the case when it comes to the IvmContext. Maybe
> > the
> > > > most
> > > > >> obvious (and shocking) issue is that IvmContext allows to bind 2
> > > > different
> > > > >> objects to the same name ! Example:
> > > > >> > {code}
> > > > >> >        IvmContext root = IvmContext.createRootContext();
> > > > >> >         root.bind("a/b/object", new Object());
> > > > >> >         IvmContext b = (IvmContext) root.lookup("a/b");
> > > > >> >         //already bound from root -> must fail, yet it does not
> > > > >> >         b.bind("object", new Object());
> > > > >> > {code}
> > > > >> > I've provided various test cases for different combinations of
> > > > >> bind/unbind/lookup that reproduce the issue.
> > > > >>
> > > > >>
> > > > >>
> > > > >> --
> > > > >> This message was sent by Atlassian JIRA
> > > > >> (v6.4.14#64029)
> > > > >>
> > > > >
> > > > >
> > > >
> > >
> >
>

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Posted by Svetlin Zarev <sv...@gmail.com>.
Actually the inner static class Writer does not have a default constructor.
This was introduced yesterday (commit 5830c209), so maybe it's not that
critical.

https://issues.apache.org/jira/browse/TOMEE-2099

2017-07-20 14:45 GMT+03:00 Romain Manni-Bucau <rm...@gmail.com>:

> looks like the class is not packaged in an arquillian war so it is not
> instantiable. is that an option?
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <https://blog-rmannibucau.rhcloud.com> | Old Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/
> rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
> <https://javaeefactory-rmannibucau.rhcloud.com>
>
> 2017-07-20 13:42 GMT+02:00 Svetlin Zarev <svetlin.angelov.zarev@gmail.com
> >:
>
> > Hi,
> >
> > The IvmContext arquillian test passes against current master: [1]
> > The CXF tests fail because of no such method errors:
> > java.lang.NoSuchMethodException:
> > org.apache.openejb.server.cxf.rs.AppPropertiesPropagationTest$
> > Writer.<init>()
> > Maybe CXF was updated ?
> >
> > [1] https://gist.github.com/SvetlinZarev/90d7deb0326e7b670440f0a9a442af
> 1d
> >
> > Kind regards,
> > Svetlin
> >
> > 2017-07-20 14:02 GMT+03:00 Jonathan Gallimore <
> > jonathan.gallimore@gmail.com>
> > :
> >
> > > Happy to try it again, but here's the tests that were failing for me on
> > > master:
> > >
> > > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > > testListContextTree
> > > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > > testContextListBindings
> > > org.apache.openejb.server.cxf.rs.CustomProviderTest.customProvider
> > > org.apache.openejb.server.cxf.rs.CustomProviderTest.
> > customSpecificProvider
> > > org.apache.openejb.server.cxf.rs.CustomProviderWithConfigTest.config
> > > org.apache.openejb.server.cxf.rs.DiscoverCustomProviderTest.
> > customProvider
> > >
> > > I haven't as yet dug into the root cause of the test failures. Will
> > likely
> > > be this evening before I can do that.
> > >
> > > Jon
> > >
> > > On Thu, Jul 20, 2017 at 9:28 AM, Jonathan Gallimore <
> > > jonathan.gallimore@gmail.com> wrote:
> > >
> > > > Thanks Svetlin - I'll review later today. I'm currently getting some
> > > > IvmContextTest test failures on master - I'll send over a list. Happy
> > to
> > > > help fix these.
> > > >
> > > > Jon
> > > >
> > > > On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <
> > jira@apache.org>
> > > > wrote:
> > > >
> > > >>
> > > >>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=com.
> > > >> atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
> > > >> l&focusedCommentId=16094340#comment-16094340 ]
> > > >>
> > > >> ASF GitHub Bot commented on TOMEE-2102:
> > > >> ---------------------------------------
> > > >>
> > > >> GitHub user SvetlinZarev opened a pull request:
> > > >>
> > > >>     https://github.com/apache/tomee/pull/94
> > > >>
> > > >>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
> > > >>
> > > >>
> > > >>
> > > >> You can merge this pull request into a Git repository by running:
> > > >>
> > > >>     $ git pull https://github.com/SvetlinZarev/tomee fixBindUndbind
> > > >>
> > > >> Alternatively you can review and apply these changes as the patch
> at:
> > > >>
> > > >>     https://github.com/apache/tomee/pull/94.patch
> > > >>
> > > >> To close this pull request, make a commit to your master/trunk
> branch
> > > >> with (at least) the following in the commit message:
> > > >>
> > > >>     This closes #94
> > > >>
> > > >> ----
> > > >> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
> > > >> Author: Svetlin Zarev <sv...@sap.com>
> > > >> Date:   2017-07-20T06:44:11Z
> > > >>
> > > >>     Add tests that verify the behaviour of IvmContext bind/unbind
> > > >>
> > > >> ----
> > > >>
> > > >>
> > > >> > IvmContext bind/unbind creates duplicate contexts
> > > >> > -------------------------------------------------
> > > >> >
> > > >> >                 Key: TOMEE-2102
> > > >> >                 URL: https://issues.apache.org/
> > jira/browse/TOMEE-2102
> > > >> >             Project: TomEE
> > > >> >          Issue Type: Bug
> > > >> >            Reporter: Svetlin Zarev
> > > >> >
> > > >> > Imagine you have the flowing context "a/b/object". The context
> tree
> > > can
> > > >> be created in two ways:
> > > >> > 1. Relative to the root or some
> > > >> > {code}
> > > >> > IvmContext root = IvmContext.createRootContext();
> > > >> > root.bind("a/b/object", new Object);
> > > >> > {code}
> > > >> > 2. Relative to some node:
> > > >> > {code}
> > > >> > IvmContext root = IvmContext.createRootContext();
> > > >> > root.bind("a", null);
> > > >> > IvmContext a = root.lookup("a");
> > > >> > a.bind("b", null);
> > > >> > IvmContext b = root.lookup("b")
> > > >> > a.bind("object", new Object())
> > > >> > {code}
> > > >> > So when one looks up "object" or "a" or "b" or object, one has to
> > get
> > > >> the very same result regardless if the context tree was created by 1
> > or
> > > by
> > > >> 2. Yet this is not the case when it comes to the IvmContext. Maybe
> the
> > > most
> > > >> obvious (and shocking) issue is that IvmContext allows to bind 2
> > > different
> > > >> objects to the same name ! Example:
> > > >> > {code}
> > > >> >        IvmContext root = IvmContext.createRootContext();
> > > >> >         root.bind("a/b/object", new Object());
> > > >> >         IvmContext b = (IvmContext) root.lookup("a/b");
> > > >> >         //already bound from root -> must fail, yet it does not
> > > >> >         b.bind("object", new Object());
> > > >> > {code}
> > > >> > I've provided various test cases for different combinations of
> > > >> bind/unbind/lookup that reproduce the issue.
> > > >>
> > > >>
> > > >>
> > > >> --
> > > >> This message was sent by Atlassian JIRA
> > > >> (v6.4.14#64029)
> > > >>
> > > >
> > > >
> > >
> >
>

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Posted by Romain Manni-Bucau <rm...@gmail.com>.
looks like the class is not packaged in an arquillian war so it is not
instantiable. is that an option?


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<https://blog-rmannibucau.rhcloud.com> | Old Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | JavaEE Factory
<https://javaeefactory-rmannibucau.rhcloud.com>

2017-07-20 13:42 GMT+02:00 Svetlin Zarev <sv...@gmail.com>:

> Hi,
>
> The IvmContext arquillian test passes against current master: [1]
> The CXF tests fail because of no such method errors:
> java.lang.NoSuchMethodException:
> org.apache.openejb.server.cxf.rs.AppPropertiesPropagationTest$
> Writer.<init>()
> Maybe CXF was updated ?
>
> [1] https://gist.github.com/SvetlinZarev/90d7deb0326e7b670440f0a9a442af1d
>
> Kind regards,
> Svetlin
>
> 2017-07-20 14:02 GMT+03:00 Jonathan Gallimore <
> jonathan.gallimore@gmail.com>
> :
>
> > Happy to try it again, but here's the tests that were failing for me on
> > master:
> >
> > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > testListContextTree
> > org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> > testContextListBindings
> > org.apache.openejb.server.cxf.rs.CustomProviderTest.customProvider
> > org.apache.openejb.server.cxf.rs.CustomProviderTest.
> customSpecificProvider
> > org.apache.openejb.server.cxf.rs.CustomProviderWithConfigTest.config
> > org.apache.openejb.server.cxf.rs.DiscoverCustomProviderTest.
> customProvider
> >
> > I haven't as yet dug into the root cause of the test failures. Will
> likely
> > be this evening before I can do that.
> >
> > Jon
> >
> > On Thu, Jul 20, 2017 at 9:28 AM, Jonathan Gallimore <
> > jonathan.gallimore@gmail.com> wrote:
> >
> > > Thanks Svetlin - I'll review later today. I'm currently getting some
> > > IvmContextTest test failures on master - I'll send over a list. Happy
> to
> > > help fix these.
> > >
> > > Jon
> > >
> > > On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <
> jira@apache.org>
> > > wrote:
> > >
> > >>
> > >>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=com.
> > >> atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
> > >> l&focusedCommentId=16094340#comment-16094340 ]
> > >>
> > >> ASF GitHub Bot commented on TOMEE-2102:
> > >> ---------------------------------------
> > >>
> > >> GitHub user SvetlinZarev opened a pull request:
> > >>
> > >>     https://github.com/apache/tomee/pull/94
> > >>
> > >>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
> > >>
> > >>
> > >>
> > >> You can merge this pull request into a Git repository by running:
> > >>
> > >>     $ git pull https://github.com/SvetlinZarev/tomee fixBindUndbind
> > >>
> > >> Alternatively you can review and apply these changes as the patch at:
> > >>
> > >>     https://github.com/apache/tomee/pull/94.patch
> > >>
> > >> To close this pull request, make a commit to your master/trunk branch
> > >> with (at least) the following in the commit message:
> > >>
> > >>     This closes #94
> > >>
> > >> ----
> > >> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
> > >> Author: Svetlin Zarev <sv...@sap.com>
> > >> Date:   2017-07-20T06:44:11Z
> > >>
> > >>     Add tests that verify the behaviour of IvmContext bind/unbind
> > >>
> > >> ----
> > >>
> > >>
> > >> > IvmContext bind/unbind creates duplicate contexts
> > >> > -------------------------------------------------
> > >> >
> > >> >                 Key: TOMEE-2102
> > >> >                 URL: https://issues.apache.org/
> jira/browse/TOMEE-2102
> > >> >             Project: TomEE
> > >> >          Issue Type: Bug
> > >> >            Reporter: Svetlin Zarev
> > >> >
> > >> > Imagine you have the flowing context "a/b/object". The context tree
> > can
> > >> be created in two ways:
> > >> > 1. Relative to the root or some
> > >> > {code}
> > >> > IvmContext root = IvmContext.createRootContext();
> > >> > root.bind("a/b/object", new Object);
> > >> > {code}
> > >> > 2. Relative to some node:
> > >> > {code}
> > >> > IvmContext root = IvmContext.createRootContext();
> > >> > root.bind("a", null);
> > >> > IvmContext a = root.lookup("a");
> > >> > a.bind("b", null);
> > >> > IvmContext b = root.lookup("b")
> > >> > a.bind("object", new Object())
> > >> > {code}
> > >> > So when one looks up "object" or "a" or "b" or object, one has to
> get
> > >> the very same result regardless if the context tree was created by 1
> or
> > by
> > >> 2. Yet this is not the case when it comes to the IvmContext. Maybe the
> > most
> > >> obvious (and shocking) issue is that IvmContext allows to bind 2
> > different
> > >> objects to the same name ! Example:
> > >> > {code}
> > >> >        IvmContext root = IvmContext.createRootContext();
> > >> >         root.bind("a/b/object", new Object());
> > >> >         IvmContext b = (IvmContext) root.lookup("a/b");
> > >> >         //already bound from root -> must fail, yet it does not
> > >> >         b.bind("object", new Object());
> > >> > {code}
> > >> > I've provided various test cases for different combinations of
> > >> bind/unbind/lookup that reproduce the issue.
> > >>
> > >>
> > >>
> > >> --
> > >> This message was sent by Atlassian JIRA
> > >> (v6.4.14#64029)
> > >>
> > >
> > >
> >
>

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Posted by Svetlin Zarev <sv...@gmail.com>.
Hi,

The IvmContext arquillian test passes against current master: [1]
The CXF tests fail because of no such method errors:
java.lang.NoSuchMethodException:
org.apache.openejb.server.cxf.rs.AppPropertiesPropagationTest$Writer.<init>()
Maybe CXF was updated ?

[1] https://gist.github.com/SvetlinZarev/90d7deb0326e7b670440f0a9a442af1d

Kind regards,
Svetlin

2017-07-20 14:02 GMT+03:00 Jonathan Gallimore <jo...@gmail.com>
:

> Happy to try it again, but here's the tests that were failing for me on
> master:
>
> org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> testListContextTree
> org.apache.openejb.arquillian.tests.naming.IvmContextTest.
> testContextListBindings
> org.apache.openejb.server.cxf.rs.CustomProviderTest.customProvider
> org.apache.openejb.server.cxf.rs.CustomProviderTest.customSpecificProvider
> org.apache.openejb.server.cxf.rs.CustomProviderWithConfigTest.config
> org.apache.openejb.server.cxf.rs.DiscoverCustomProviderTest.customProvider
>
> I haven't as yet dug into the root cause of the test failures. Will likely
> be this evening before I can do that.
>
> Jon
>
> On Thu, Jul 20, 2017 at 9:28 AM, Jonathan Gallimore <
> jonathan.gallimore@gmail.com> wrote:
>
> > Thanks Svetlin - I'll review later today. I'm currently getting some
> > IvmContextTest test failures on master - I'll send over a list. Happy to
> > help fix these.
> >
> > Jon
> >
> > On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <ji...@apache.org>
> > wrote:
> >
> >>
> >>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=com.
> >> atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
> >> l&focusedCommentId=16094340#comment-16094340 ]
> >>
> >> ASF GitHub Bot commented on TOMEE-2102:
> >> ---------------------------------------
> >>
> >> GitHub user SvetlinZarev opened a pull request:
> >>
> >>     https://github.com/apache/tomee/pull/94
> >>
> >>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
> >>
> >>
> >>
> >> You can merge this pull request into a Git repository by running:
> >>
> >>     $ git pull https://github.com/SvetlinZarev/tomee fixBindUndbind
> >>
> >> Alternatively you can review and apply these changes as the patch at:
> >>
> >>     https://github.com/apache/tomee/pull/94.patch
> >>
> >> To close this pull request, make a commit to your master/trunk branch
> >> with (at least) the following in the commit message:
> >>
> >>     This closes #94
> >>
> >> ----
> >> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
> >> Author: Svetlin Zarev <sv...@sap.com>
> >> Date:   2017-07-20T06:44:11Z
> >>
> >>     Add tests that verify the behaviour of IvmContext bind/unbind
> >>
> >> ----
> >>
> >>
> >> > IvmContext bind/unbind creates duplicate contexts
> >> > -------------------------------------------------
> >> >
> >> >                 Key: TOMEE-2102
> >> >                 URL: https://issues.apache.org/jira/browse/TOMEE-2102
> >> >             Project: TomEE
> >> >          Issue Type: Bug
> >> >            Reporter: Svetlin Zarev
> >> >
> >> > Imagine you have the flowing context "a/b/object". The context tree
> can
> >> be created in two ways:
> >> > 1. Relative to the root or some
> >> > {code}
> >> > IvmContext root = IvmContext.createRootContext();
> >> > root.bind("a/b/object", new Object);
> >> > {code}
> >> > 2. Relative to some node:
> >> > {code}
> >> > IvmContext root = IvmContext.createRootContext();
> >> > root.bind("a", null);
> >> > IvmContext a = root.lookup("a");
> >> > a.bind("b", null);
> >> > IvmContext b = root.lookup("b")
> >> > a.bind("object", new Object())
> >> > {code}
> >> > So when one looks up "object" or "a" or "b" or object, one has to get
> >> the very same result regardless if the context tree was created by 1 or
> by
> >> 2. Yet this is not the case when it comes to the IvmContext. Maybe the
> most
> >> obvious (and shocking) issue is that IvmContext allows to bind 2
> different
> >> objects to the same name ! Example:
> >> > {code}
> >> >        IvmContext root = IvmContext.createRootContext();
> >> >         root.bind("a/b/object", new Object());
> >> >         IvmContext b = (IvmContext) root.lookup("a/b");
> >> >         //already bound from root -> must fail, yet it does not
> >> >         b.bind("object", new Object());
> >> > {code}
> >> > I've provided various test cases for different combinations of
> >> bind/unbind/lookup that reproduce the issue.
> >>
> >>
> >>
> >> --
> >> This message was sent by Atlassian JIRA
> >> (v6.4.14#64029)
> >>
> >
> >
>

Re: [jira] [Commented] (TOMEE-2102) IvmContext bind/unbind creates duplicate contexts

Posted by Jonathan Gallimore <jo...@gmail.com>.
Happy to try it again, but here's the tests that were failing for me on
master:

org.apache.openejb.arquillian.tests.naming.IvmContextTest.testListContextTree
org.apache.openejb.arquillian.tests.naming.IvmContextTest.testContextListBindings
org.apache.openejb.server.cxf.rs.CustomProviderTest.customProvider
org.apache.openejb.server.cxf.rs.CustomProviderTest.customSpecificProvider
org.apache.openejb.server.cxf.rs.CustomProviderWithConfigTest.config
org.apache.openejb.server.cxf.rs.DiscoverCustomProviderTest.customProvider

I haven't as yet dug into the root cause of the test failures. Will likely
be this evening before I can do that.

Jon

On Thu, Jul 20, 2017 at 9:28 AM, Jonathan Gallimore <
jonathan.gallimore@gmail.com> wrote:

> Thanks Svetlin - I'll review later today. I'm currently getting some
> IvmContextTest test failures on master - I'll send over a list. Happy to
> help fix these.
>
> Jon
>
> On Thu, Jul 20, 2017 at 9:19 AM, ASF GitHub Bot (JIRA) <ji...@apache.org>
> wrote:
>
>>
>>     [ https://issues.apache.org/jira/browse/TOMEE-2102?page=com.
>> atlassian.jira.plugin.system.issuetabpanels:comment-tabpane
>> l&focusedCommentId=16094340#comment-16094340 ]
>>
>> ASF GitHub Bot commented on TOMEE-2102:
>> ---------------------------------------
>>
>> GitHub user SvetlinZarev opened a pull request:
>>
>>     https://github.com/apache/tomee/pull/94
>>
>>     TOMEE-2102: IvmContext bind/unbind creates duplicate contexts
>>
>>
>>
>> You can merge this pull request into a Git repository by running:
>>
>>     $ git pull https://github.com/SvetlinZarev/tomee fixBindUndbind
>>
>> Alternatively you can review and apply these changes as the patch at:
>>
>>     https://github.com/apache/tomee/pull/94.patch
>>
>> To close this pull request, make a commit to your master/trunk branch
>> with (at least) the following in the commit message:
>>
>>     This closes #94
>>
>> ----
>> commit 12bf481e9bdbaec232c655abb63e1fd496d98fdd
>> Author: Svetlin Zarev <sv...@sap.com>
>> Date:   2017-07-20T06:44:11Z
>>
>>     Add tests that verify the behaviour of IvmContext bind/unbind
>>
>> ----
>>
>>
>> > IvmContext bind/unbind creates duplicate contexts
>> > -------------------------------------------------
>> >
>> >                 Key: TOMEE-2102
>> >                 URL: https://issues.apache.org/jira/browse/TOMEE-2102
>> >             Project: TomEE
>> >          Issue Type: Bug
>> >            Reporter: Svetlin Zarev
>> >
>> > Imagine you have the flowing context "a/b/object". The context tree can
>> be created in two ways:
>> > 1. Relative to the root or some
>> > {code}
>> > IvmContext root = IvmContext.createRootContext();
>> > root.bind("a/b/object", new Object);
>> > {code}
>> > 2. Relative to some node:
>> > {code}
>> > IvmContext root = IvmContext.createRootContext();
>> > root.bind("a", null);
>> > IvmContext a = root.lookup("a");
>> > a.bind("b", null);
>> > IvmContext b = root.lookup("b")
>> > a.bind("object", new Object())
>> > {code}
>> > So when one looks up "object" or "a" or "b" or object, one has to get
>> the very same result regardless if the context tree was created by 1 or by
>> 2. Yet this is not the case when it comes to the IvmContext. Maybe the most
>> obvious (and shocking) issue is that IvmContext allows to bind 2 different
>> objects to the same name ! Example:
>> > {code}
>> >        IvmContext root = IvmContext.createRootContext();
>> >         root.bind("a/b/object", new Object());
>> >         IvmContext b = (IvmContext) root.lookup("a/b");
>> >         //already bound from root -> must fail, yet it does not
>> >         b.bind("object", new Object());
>> > {code}
>> > I've provided various test cases for different combinations of
>> bind/unbind/lookup that reproduce the issue.
>>
>>
>>
>> --
>> This message was sent by Atlassian JIRA
>> (v6.4.14#64029)
>>
>
>