You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Luis Castro <lu...@animotion.com.mx> on 2014/04/16 04:32:07 UTC
Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Hello.
Environment TOMEE 1.6.0 and OpenEJB Provided
<dependencies>
<!-- tomee-->
<dependency>
<groupId>org.apache.openejb</groupId>
<artifactId>apache-tomee</artifactId>
<version>1.6.0</version>
<classifier>webprofile</classifier>
<type>zip</type>
<scope>provided</scope>
</dependency>
Use Case 1#
Name aplication "App One" ;
"App One" have the class EJB "UsuariosFacadeLocal" in package
com.appone.businesslayer.ejbs.local
Code Example :
package com.appone.businesslayer.ejbs;
import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
import javax.ejb.Stateless;
import javax.ejb.TransactionManagement;
import javax.ejb.TransactionManagementType;
@Stateless
@TransactionManagement(TransactionManagementType.CONTAINER)
public class UsuariosFacade implements UsuariosFacadeLocal {
@Override
public String hello() {
return this.getClass().getCanonicalName();
}
}
And deployed and run successful
Another app inside same server Tomee 1.6.0
Name aplication "App Two" ;
"App TWO" have the class EJB "UsuariosFacadeLocal" in package
com.apptwo.businesslayer.ejbs.local
And deployed and run ERROR:
Grave: Application cannot be deployed as it contains deployment-ids which
are in use: app: /home/programacion/animotion
app/App1/target/AppOne-1.0-SNAPSHOT
abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
createApplication
Grave: DeploymentId already used: UsuariosFacade
abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
startInternal
Grave: Unable to deploy collapsed ear in war
StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
deployed as it contains deployment-ids which are in use: app:
/home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
UsuariosFacade
I can solved this situation with add anotation "name" in second App
@Stateless(name = "UsuariosFacadeAppTwo")
in EAR must not have the same class names, I understand. ,
But in 2 different app?
Questions:
1) Its Bug ?
2) I am making a mistake in the specification?
3) Should this be possible? 2 app, 2 different EJB class
Attached project, if needed to reproduce the situation
Sorry for google traductor,
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Romain Manni-Bucau <rm...@gmail.com>.
sure, push a mail on the list but not sure why we wouldn't do it ;)
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-04-16 10:27 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
> Then, it's perfect.
> Changing the default should maybe be discussed?
>
> JLouis
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
>
> On Wed, Apr 16, 2014 at 10:07 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
>> syst prop is already here so just the default needs to be adjusted.
>>
>> Can even be done in default system.properties, it is commented today
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014-04-16 9:28 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
>> > I wouldn't say rare actually.
>> > I mean, now (since Java EE 6) we have collapsed EAR, nobody cares about
>> EAR
>> > nightmare, but sometimes they want to share the same business logic on 2
>> > webapps. So that occurs I think.
>> >
>> > Definitely, we could do the opposite which is:
>> > - remove old names by default
>> > - add a system property to bind them again if needed
>> >
>> > That would allow TomEE to always work out of the box and users to keep
>> some
>> > kind off compatibility if needed.
>> >
>> >
>> > --
>> > Jean-Louis Monteiro
>> > http://twitter.com/jlouismonteiro
>> > http://www.tomitribe.com
>> >
>> >
>> > On Wed, Apr 16, 2014 at 9:21 AM, Romain Manni-Bucau
>> > <rm...@gmail.com>wrote:
>> >
>> >> or just change the default.
>> >>
>> >> That said deploying the same ejb in two apps is actually rare so not
>> >> sure we really need to handle it by default.
>> >> Romain Manni-Bucau
>> >> Twitter: @rmannibucau
>> >> Blog: http://rmannibucau.wordpress.com/
>> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> >> Github: https://github.com/rmannibucau
>> >>
>> >>
>> >>
>> >> 2014-04-16 9:19 GMT+02:00 Jean-Louis Monteiro <jlmonteiro@tomitribe.com
>> >:
>> >> > We should probably add a sys prop (if it does not already exists) to
>> de
>> >> > activate the old JNDI names.
>> >> > Isn't it?
>> >> >
>> >> >
>> >> > On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
>> >> > <rm...@gmail.com>wrote:
>> >> >
>> >> >> Hi
>> >> >>
>> >> >> 1) no
>> >> >> 2) no
>> >> >> 3) yes http://tomee.apache.org/jndi-names.html
>> >> >>
>> >> >> that's inheritance of old names we keep for compatibility
>> >> >>
>> >> >>
>> >> >> Romain Manni-Bucau
>> >> >> Twitter: @rmannibucau
>> >> >> Blog: http://rmannibucau.wordpress.com/
>> >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> >> >> Github: https://github.com/rmannibucau
>> >> >>
>> >> >>
>> >> >>
>> >> >> 2014-04-16 4:32 GMT+02:00 Luis Castro <luis_castro@animotion.com.mx
>> >:
>> >> >> > Hello.
>> >> >> >
>> >> >> >
>> >> >> > Environment TOMEE 1.6.0 and OpenEJB Provided
>> >> >> >
>> >> >> > <dependencies>
>> >> >> >
>> >> >> > <!-- tomee-->
>> >> >> > <dependency>
>> >> >> > <groupId>org.apache.openejb</groupId>
>> >> >> > <artifactId>apache-tomee</artifactId>
>> >> >> > <version>1.6.0</version>
>> >> >> > <classifier>webprofile</classifier>
>> >> >> > <type>zip</type>
>> >> >> > <scope>provided</scope>
>> >> >> > </dependency>
>> >> >> >
>> >> >> > Use Case 1#
>> >> >> >
>> >> >> > Name aplication "App One" ;
>> >> >> >
>> >> >> > "App One" have the class EJB "UsuariosFacadeLocal" in package
>> >> >> > com.appone.businesslayer.ejbs.local
>> >> >> >
>> >> >> > Code Example :
>> >> >> > package com.appone.businesslayer.ejbs;
>> >> >> >
>> >> >> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
>> >> >> > import javax.ejb.Stateless;
>> >> >> > import javax.ejb.TransactionManagement;
>> >> >> > import javax.ejb.TransactionManagementType;
>> >> >> >
>> >> >> > @Stateless
>> >> >> > @TransactionManagement(TransactionManagementType.CONTAINER)
>> >> >> > public class UsuariosFacade implements UsuariosFacadeLocal {
>> >> >> >
>> >> >> > @Override
>> >> >> > public String hello() {
>> >> >> > return this.getClass().getCanonicalName();
>> >> >> > }
>> >> >> > }
>> >> >> >
>> >> >> > And deployed and run successful
>> >> >> >
>> >> >> > Another app inside same server Tomee 1.6.0
>> >> >> > Name aplication "App Two" ;
>> >> >> >
>> >> >> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
>> >> >> > com.apptwo.businesslayer.ejbs.local
>> >> >> >
>> >> >> > And deployed and run ERROR:
>> >> >> >
>> >> >> > Grave: Application cannot be deployed as it contains deployment-ids
>> >> which
>> >> >> > are in use: app: /home/programacion/animotion
>> >> >> > app/App1/target/AppOne-1.0-SNAPSHOT
>> >> >> > abr 15, 2014 8:48:12 PM
>> org.apache.openejb.assembler.classic.Assembler
>> >> >> > createApplication
>> >> >> > Grave: DeploymentId already used: UsuariosFacade
>> >> >> > abr 15, 2014 8:48:12 PM
>> org.apache.tomee.catalina.TomcatWebAppBuilder
>> >> >> > startInternal
>> >> >> > Grave: Unable to deploy collapsed ear in war
>> >> >> >
>> >>
>> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
>> >> >> > org.apache.openejb.DuplicateDeploymentIdException: Application
>> cannot
>> >> be
>> >> >> > deployed as it contains deployment-ids which are in use: app:
>> >> >> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
>> >> >> > UsuariosFacade
>> >> >> >
>> >> >> >
>> >> >> > I can solved this situation with add anotation "name" in second App
>> >> >> >
>> >> >> > @Stateless(name = "UsuariosFacadeAppTwo")
>> >> >> >
>> >> >> >
>> >> >> > in EAR must not have the same class names, I understand. ,
>> >> >> >
>> >> >> > But in 2 different app?
>> >> >> >
>> >> >> > Questions:
>> >> >> >
>> >> >> > 1) Its Bug ?
>> >> >> > 2) I am making a mistake in the specification?
>> >> >> > 3) Should this be possible? 2 app, 2 different EJB class
>> >> >> >
>> >> >> >
>> >> >> > Attached project, if needed to reproduce the situation
>> >> >> >
>> >> >> > Sorry for google traductor,
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > --
>> >> > Jean-Louis Monteiro
>> >> > http://twitter.com/jlouismonteiro
>> >> > http://www.tomitribe.com
>> >>
>>
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
Then, it's perfect.
Changing the default should maybe be discussed?
JLouis
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Wed, Apr 16, 2014 at 10:07 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> syst prop is already here so just the default needs to be adjusted.
>
> Can even be done in default system.properties, it is commented today
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-04-16 9:28 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
> > I wouldn't say rare actually.
> > I mean, now (since Java EE 6) we have collapsed EAR, nobody cares about
> EAR
> > nightmare, but sometimes they want to share the same business logic on 2
> > webapps. So that occurs I think.
> >
> > Definitely, we could do the opposite which is:
> > - remove old names by default
> > - add a system property to bind them again if needed
> >
> > That would allow TomEE to always work out of the box and users to keep
> some
> > kind off compatibility if needed.
> >
> >
> > --
> > Jean-Louis Monteiro
> > http://twitter.com/jlouismonteiro
> > http://www.tomitribe.com
> >
> >
> > On Wed, Apr 16, 2014 at 9:21 AM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> >> or just change the default.
> >>
> >> That said deploying the same ejb in two apps is actually rare so not
> >> sure we really need to handle it by default.
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2014-04-16 9:19 GMT+02:00 Jean-Louis Monteiro <jlmonteiro@tomitribe.com
> >:
> >> > We should probably add a sys prop (if it does not already exists) to
> de
> >> > activate the old JNDI names.
> >> > Isn't it?
> >> >
> >> >
> >> > On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
> >> > <rm...@gmail.com>wrote:
> >> >
> >> >> Hi
> >> >>
> >> >> 1) no
> >> >> 2) no
> >> >> 3) yes http://tomee.apache.org/jndi-names.html
> >> >>
> >> >> that's inheritance of old names we keep for compatibility
> >> >>
> >> >>
> >> >> Romain Manni-Bucau
> >> >> Twitter: @rmannibucau
> >> >> Blog: http://rmannibucau.wordpress.com/
> >> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> >> Github: https://github.com/rmannibucau
> >> >>
> >> >>
> >> >>
> >> >> 2014-04-16 4:32 GMT+02:00 Luis Castro <luis_castro@animotion.com.mx
> >:
> >> >> > Hello.
> >> >> >
> >> >> >
> >> >> > Environment TOMEE 1.6.0 and OpenEJB Provided
> >> >> >
> >> >> > <dependencies>
> >> >> >
> >> >> > <!-- tomee-->
> >> >> > <dependency>
> >> >> > <groupId>org.apache.openejb</groupId>
> >> >> > <artifactId>apache-tomee</artifactId>
> >> >> > <version>1.6.0</version>
> >> >> > <classifier>webprofile</classifier>
> >> >> > <type>zip</type>
> >> >> > <scope>provided</scope>
> >> >> > </dependency>
> >> >> >
> >> >> > Use Case 1#
> >> >> >
> >> >> > Name aplication "App One" ;
> >> >> >
> >> >> > "App One" have the class EJB "UsuariosFacadeLocal" in package
> >> >> > com.appone.businesslayer.ejbs.local
> >> >> >
> >> >> > Code Example :
> >> >> > package com.appone.businesslayer.ejbs;
> >> >> >
> >> >> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
> >> >> > import javax.ejb.Stateless;
> >> >> > import javax.ejb.TransactionManagement;
> >> >> > import javax.ejb.TransactionManagementType;
> >> >> >
> >> >> > @Stateless
> >> >> > @TransactionManagement(TransactionManagementType.CONTAINER)
> >> >> > public class UsuariosFacade implements UsuariosFacadeLocal {
> >> >> >
> >> >> > @Override
> >> >> > public String hello() {
> >> >> > return this.getClass().getCanonicalName();
> >> >> > }
> >> >> > }
> >> >> >
> >> >> > And deployed and run successful
> >> >> >
> >> >> > Another app inside same server Tomee 1.6.0
> >> >> > Name aplication "App Two" ;
> >> >> >
> >> >> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
> >> >> > com.apptwo.businesslayer.ejbs.local
> >> >> >
> >> >> > And deployed and run ERROR:
> >> >> >
> >> >> > Grave: Application cannot be deployed as it contains deployment-ids
> >> which
> >> >> > are in use: app: /home/programacion/animotion
> >> >> > app/App1/target/AppOne-1.0-SNAPSHOT
> >> >> > abr 15, 2014 8:48:12 PM
> org.apache.openejb.assembler.classic.Assembler
> >> >> > createApplication
> >> >> > Grave: DeploymentId already used: UsuariosFacade
> >> >> > abr 15, 2014 8:48:12 PM
> org.apache.tomee.catalina.TomcatWebAppBuilder
> >> >> > startInternal
> >> >> > Grave: Unable to deploy collapsed ear in war
> >> >> >
> >>
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
> >> >> > org.apache.openejb.DuplicateDeploymentIdException: Application
> cannot
> >> be
> >> >> > deployed as it contains deployment-ids which are in use: app:
> >> >> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
> >> >> > UsuariosFacade
> >> >> >
> >> >> >
> >> >> > I can solved this situation with add anotation "name" in second App
> >> >> >
> >> >> > @Stateless(name = "UsuariosFacadeAppTwo")
> >> >> >
> >> >> >
> >> >> > in EAR must not have the same class names, I understand. ,
> >> >> >
> >> >> > But in 2 different app?
> >> >> >
> >> >> > Questions:
> >> >> >
> >> >> > 1) Its Bug ?
> >> >> > 2) I am making a mistake in the specification?
> >> >> > 3) Should this be possible? 2 app, 2 different EJB class
> >> >> >
> >> >> >
> >> >> > Attached project, if needed to reproduce the situation
> >> >> >
> >> >> > Sorry for google traductor,
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > --
> >> > Jean-Louis Monteiro
> >> > http://twitter.com/jlouismonteiro
> >> > http://www.tomitribe.com
> >>
>
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Romain Manni-Bucau <rm...@gmail.com>.
syst prop is already here so just the default needs to be adjusted.
Can even be done in default system.properties, it is commented today
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-04-16 9:28 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
> I wouldn't say rare actually.
> I mean, now (since Java EE 6) we have collapsed EAR, nobody cares about EAR
> nightmare, but sometimes they want to share the same business logic on 2
> webapps. So that occurs I think.
>
> Definitely, we could do the opposite which is:
> - remove old names by default
> - add a system property to bind them again if needed
>
> That would allow TomEE to always work out of the box and users to keep some
> kind off compatibility if needed.
>
>
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
>
>
> On Wed, Apr 16, 2014 at 9:21 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
>> or just change the default.
>>
>> That said deploying the same ejb in two apps is actually rare so not
>> sure we really need to handle it by default.
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014-04-16 9:19 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
>> > We should probably add a sys prop (if it does not already exists) to de
>> > activate the old JNDI names.
>> > Isn't it?
>> >
>> >
>> > On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
>> > <rm...@gmail.com>wrote:
>> >
>> >> Hi
>> >>
>> >> 1) no
>> >> 2) no
>> >> 3) yes http://tomee.apache.org/jndi-names.html
>> >>
>> >> that's inheritance of old names we keep for compatibility
>> >>
>> >>
>> >> Romain Manni-Bucau
>> >> Twitter: @rmannibucau
>> >> Blog: http://rmannibucau.wordpress.com/
>> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> >> Github: https://github.com/rmannibucau
>> >>
>> >>
>> >>
>> >> 2014-04-16 4:32 GMT+02:00 Luis Castro <lu...@animotion.com.mx>:
>> >> > Hello.
>> >> >
>> >> >
>> >> > Environment TOMEE 1.6.0 and OpenEJB Provided
>> >> >
>> >> > <dependencies>
>> >> >
>> >> > <!-- tomee-->
>> >> > <dependency>
>> >> > <groupId>org.apache.openejb</groupId>
>> >> > <artifactId>apache-tomee</artifactId>
>> >> > <version>1.6.0</version>
>> >> > <classifier>webprofile</classifier>
>> >> > <type>zip</type>
>> >> > <scope>provided</scope>
>> >> > </dependency>
>> >> >
>> >> > Use Case 1#
>> >> >
>> >> > Name aplication "App One" ;
>> >> >
>> >> > "App One" have the class EJB "UsuariosFacadeLocal" in package
>> >> > com.appone.businesslayer.ejbs.local
>> >> >
>> >> > Code Example :
>> >> > package com.appone.businesslayer.ejbs;
>> >> >
>> >> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
>> >> > import javax.ejb.Stateless;
>> >> > import javax.ejb.TransactionManagement;
>> >> > import javax.ejb.TransactionManagementType;
>> >> >
>> >> > @Stateless
>> >> > @TransactionManagement(TransactionManagementType.CONTAINER)
>> >> > public class UsuariosFacade implements UsuariosFacadeLocal {
>> >> >
>> >> > @Override
>> >> > public String hello() {
>> >> > return this.getClass().getCanonicalName();
>> >> > }
>> >> > }
>> >> >
>> >> > And deployed and run successful
>> >> >
>> >> > Another app inside same server Tomee 1.6.0
>> >> > Name aplication "App Two" ;
>> >> >
>> >> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
>> >> > com.apptwo.businesslayer.ejbs.local
>> >> >
>> >> > And deployed and run ERROR:
>> >> >
>> >> > Grave: Application cannot be deployed as it contains deployment-ids
>> which
>> >> > are in use: app: /home/programacion/animotion
>> >> > app/App1/target/AppOne-1.0-SNAPSHOT
>> >> > abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
>> >> > createApplication
>> >> > Grave: DeploymentId already used: UsuariosFacade
>> >> > abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
>> >> > startInternal
>> >> > Grave: Unable to deploy collapsed ear in war
>> >> >
>> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
>> >> > org.apache.openejb.DuplicateDeploymentIdException: Application cannot
>> be
>> >> > deployed as it contains deployment-ids which are in use: app:
>> >> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
>> >> > UsuariosFacade
>> >> >
>> >> >
>> >> > I can solved this situation with add anotation "name" in second App
>> >> >
>> >> > @Stateless(name = "UsuariosFacadeAppTwo")
>> >> >
>> >> >
>> >> > in EAR must not have the same class names, I understand. ,
>> >> >
>> >> > But in 2 different app?
>> >> >
>> >> > Questions:
>> >> >
>> >> > 1) Its Bug ?
>> >> > 2) I am making a mistake in the specification?
>> >> > 3) Should this be possible? 2 app, 2 different EJB class
>> >> >
>> >> >
>> >> > Attached project, if needed to reproduce the situation
>> >> >
>> >> > Sorry for google traductor,
>> >>
>> >
>> >
>> >
>> > --
>> > --
>> > Jean-Louis Monteiro
>> > http://twitter.com/jlouismonteiro
>> > http://www.tomitribe.com
>>
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
I wouldn't say rare actually.
I mean, now (since Java EE 6) we have collapsed EAR, nobody cares about EAR
nightmare, but sometimes they want to share the same business logic on 2
webapps. So that occurs I think.
Definitely, we could do the opposite which is:
- remove old names by default
- add a system property to bind them again if needed
That would allow TomEE to always work out of the box and users to keep some
kind off compatibility if needed.
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
On Wed, Apr 16, 2014 at 9:21 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> or just change the default.
>
> That said deploying the same ejb in two apps is actually rare so not
> sure we really need to handle it by default.
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-04-16 9:19 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
> > We should probably add a sys prop (if it does not already exists) to de
> > activate the old JNDI names.
> > Isn't it?
> >
> >
> > On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
> > <rm...@gmail.com>wrote:
> >
> >> Hi
> >>
> >> 1) no
> >> 2) no
> >> 3) yes http://tomee.apache.org/jndi-names.html
> >>
> >> that's inheritance of old names we keep for compatibility
> >>
> >>
> >> Romain Manni-Bucau
> >> Twitter: @rmannibucau
> >> Blog: http://rmannibucau.wordpress.com/
> >> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> >> Github: https://github.com/rmannibucau
> >>
> >>
> >>
> >> 2014-04-16 4:32 GMT+02:00 Luis Castro <lu...@animotion.com.mx>:
> >> > Hello.
> >> >
> >> >
> >> > Environment TOMEE 1.6.0 and OpenEJB Provided
> >> >
> >> > <dependencies>
> >> >
> >> > <!-- tomee-->
> >> > <dependency>
> >> > <groupId>org.apache.openejb</groupId>
> >> > <artifactId>apache-tomee</artifactId>
> >> > <version>1.6.0</version>
> >> > <classifier>webprofile</classifier>
> >> > <type>zip</type>
> >> > <scope>provided</scope>
> >> > </dependency>
> >> >
> >> > Use Case 1#
> >> >
> >> > Name aplication "App One" ;
> >> >
> >> > "App One" have the class EJB "UsuariosFacadeLocal" in package
> >> > com.appone.businesslayer.ejbs.local
> >> >
> >> > Code Example :
> >> > package com.appone.businesslayer.ejbs;
> >> >
> >> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
> >> > import javax.ejb.Stateless;
> >> > import javax.ejb.TransactionManagement;
> >> > import javax.ejb.TransactionManagementType;
> >> >
> >> > @Stateless
> >> > @TransactionManagement(TransactionManagementType.CONTAINER)
> >> > public class UsuariosFacade implements UsuariosFacadeLocal {
> >> >
> >> > @Override
> >> > public String hello() {
> >> > return this.getClass().getCanonicalName();
> >> > }
> >> > }
> >> >
> >> > And deployed and run successful
> >> >
> >> > Another app inside same server Tomee 1.6.0
> >> > Name aplication "App Two" ;
> >> >
> >> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
> >> > com.apptwo.businesslayer.ejbs.local
> >> >
> >> > And deployed and run ERROR:
> >> >
> >> > Grave: Application cannot be deployed as it contains deployment-ids
> which
> >> > are in use: app: /home/programacion/animotion
> >> > app/App1/target/AppOne-1.0-SNAPSHOT
> >> > abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
> >> > createApplication
> >> > Grave: DeploymentId already used: UsuariosFacade
> >> > abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> >> > startInternal
> >> > Grave: Unable to deploy collapsed ear in war
> >> >
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
> >> > org.apache.openejb.DuplicateDeploymentIdException: Application cannot
> be
> >> > deployed as it contains deployment-ids which are in use: app:
> >> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
> >> > UsuariosFacade
> >> >
> >> >
> >> > I can solved this situation with add anotation "name" in second App
> >> >
> >> > @Stateless(name = "UsuariosFacadeAppTwo")
> >> >
> >> >
> >> > in EAR must not have the same class names, I understand. ,
> >> >
> >> > But in 2 different app?
> >> >
> >> > Questions:
> >> >
> >> > 1) Its Bug ?
> >> > 2) I am making a mistake in the specification?
> >> > 3) Should this be possible? 2 app, 2 different EJB class
> >> >
> >> >
> >> > Attached project, if needed to reproduce the situation
> >> >
> >> > Sorry for google traductor,
> >>
> >
> >
> >
> > --
> > --
> > Jean-Louis Monteiro
> > http://twitter.com/jlouismonteiro
> > http://www.tomitribe.com
>
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Romain Manni-Bucau <rm...@gmail.com>.
or just change the default.
That said deploying the same ejb in two apps is actually rare so not
sure we really need to handle it by default.
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-04-16 9:19 GMT+02:00 Jean-Louis Monteiro <jl...@tomitribe.com>:
> We should probably add a sys prop (if it does not already exists) to de
> activate the old JNDI names.
> Isn't it?
>
>
> On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
> <rm...@gmail.com>wrote:
>
>> Hi
>>
>> 1) no
>> 2) no
>> 3) yes http://tomee.apache.org/jndi-names.html
>>
>> that's inheritance of old names we keep for compatibility
>>
>>
>> Romain Manni-Bucau
>> Twitter: @rmannibucau
>> Blog: http://rmannibucau.wordpress.com/
>> LinkedIn: http://fr.linkedin.com/in/rmannibucau
>> Github: https://github.com/rmannibucau
>>
>>
>>
>> 2014-04-16 4:32 GMT+02:00 Luis Castro <lu...@animotion.com.mx>:
>> > Hello.
>> >
>> >
>> > Environment TOMEE 1.6.0 and OpenEJB Provided
>> >
>> > <dependencies>
>> >
>> > <!-- tomee-->
>> > <dependency>
>> > <groupId>org.apache.openejb</groupId>
>> > <artifactId>apache-tomee</artifactId>
>> > <version>1.6.0</version>
>> > <classifier>webprofile</classifier>
>> > <type>zip</type>
>> > <scope>provided</scope>
>> > </dependency>
>> >
>> > Use Case 1#
>> >
>> > Name aplication "App One" ;
>> >
>> > "App One" have the class EJB "UsuariosFacadeLocal" in package
>> > com.appone.businesslayer.ejbs.local
>> >
>> > Code Example :
>> > package com.appone.businesslayer.ejbs;
>> >
>> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
>> > import javax.ejb.Stateless;
>> > import javax.ejb.TransactionManagement;
>> > import javax.ejb.TransactionManagementType;
>> >
>> > @Stateless
>> > @TransactionManagement(TransactionManagementType.CONTAINER)
>> > public class UsuariosFacade implements UsuariosFacadeLocal {
>> >
>> > @Override
>> > public String hello() {
>> > return this.getClass().getCanonicalName();
>> > }
>> > }
>> >
>> > And deployed and run successful
>> >
>> > Another app inside same server Tomee 1.6.0
>> > Name aplication "App Two" ;
>> >
>> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
>> > com.apptwo.businesslayer.ejbs.local
>> >
>> > And deployed and run ERROR:
>> >
>> > Grave: Application cannot be deployed as it contains deployment-ids which
>> > are in use: app: /home/programacion/animotion
>> > app/App1/target/AppOne-1.0-SNAPSHOT
>> > abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
>> > createApplication
>> > Grave: DeploymentId already used: UsuariosFacade
>> > abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
>> > startInternal
>> > Grave: Unable to deploy collapsed ear in war
>> > StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
>> > org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
>> > deployed as it contains deployment-ids which are in use: app:
>> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
>> > UsuariosFacade
>> >
>> >
>> > I can solved this situation with add anotation "name" in second App
>> >
>> > @Stateless(name = "UsuariosFacadeAppTwo")
>> >
>> >
>> > in EAR must not have the same class names, I understand. ,
>> >
>> > But in 2 different app?
>> >
>> > Questions:
>> >
>> > 1) Its Bug ?
>> > 2) I am making a mistake in the specification?
>> > 3) Should this be possible? 2 app, 2 different EJB class
>> >
>> >
>> > Attached project, if needed to reproduce the situation
>> >
>> > Sorry for google traductor,
>>
>
>
>
> --
> --
> Jean-Louis Monteiro
> http://twitter.com/jlouismonteiro
> http://www.tomitribe.com
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Jean-Louis Monteiro <jl...@tomitribe.com>.
We should probably add a sys prop (if it does not already exists) to de
activate the old JNDI names.
Isn't it?
On Wed, Apr 16, 2014 at 7:37 AM, Romain Manni-Bucau
<rm...@gmail.com>wrote:
> Hi
>
> 1) no
> 2) no
> 3) yes http://tomee.apache.org/jndi-names.html
>
> that's inheritance of old names we keep for compatibility
>
>
> Romain Manni-Bucau
> Twitter: @rmannibucau
> Blog: http://rmannibucau.wordpress.com/
> LinkedIn: http://fr.linkedin.com/in/rmannibucau
> Github: https://github.com/rmannibucau
>
>
>
> 2014-04-16 4:32 GMT+02:00 Luis Castro <lu...@animotion.com.mx>:
> > Hello.
> >
> >
> > Environment TOMEE 1.6.0 and OpenEJB Provided
> >
> > <dependencies>
> >
> > <!-- tomee-->
> > <dependency>
> > <groupId>org.apache.openejb</groupId>
> > <artifactId>apache-tomee</artifactId>
> > <version>1.6.0</version>
> > <classifier>webprofile</classifier>
> > <type>zip</type>
> > <scope>provided</scope>
> > </dependency>
> >
> > Use Case 1#
> >
> > Name aplication "App One" ;
> >
> > "App One" have the class EJB "UsuariosFacadeLocal" in package
> > com.appone.businesslayer.ejbs.local
> >
> > Code Example :
> > package com.appone.businesslayer.ejbs;
> >
> > import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
> > import javax.ejb.Stateless;
> > import javax.ejb.TransactionManagement;
> > import javax.ejb.TransactionManagementType;
> >
> > @Stateless
> > @TransactionManagement(TransactionManagementType.CONTAINER)
> > public class UsuariosFacade implements UsuariosFacadeLocal {
> >
> > @Override
> > public String hello() {
> > return this.getClass().getCanonicalName();
> > }
> > }
> >
> > And deployed and run successful
> >
> > Another app inside same server Tomee 1.6.0
> > Name aplication "App Two" ;
> >
> > "App TWO" have the class EJB "UsuariosFacadeLocal" in package
> > com.apptwo.businesslayer.ejbs.local
> >
> > And deployed and run ERROR:
> >
> > Grave: Application cannot be deployed as it contains deployment-ids which
> > are in use: app: /home/programacion/animotion
> > app/App1/target/AppOne-1.0-SNAPSHOT
> > abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
> > createApplication
> > Grave: DeploymentId already used: UsuariosFacade
> > abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> > startInternal
> > Grave: Unable to deploy collapsed ear in war
> > StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
> > org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
> > deployed as it contains deployment-ids which are in use: app:
> > /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
> > UsuariosFacade
> >
> >
> > I can solved this situation with add anotation "name" in second App
> >
> > @Stateless(name = "UsuariosFacadeAppTwo")
> >
> >
> > in EAR must not have the same class names, I understand. ,
> >
> > But in 2 different app?
> >
> > Questions:
> >
> > 1) Its Bug ?
> > 2) I am making a mistake in the specification?
> > 3) Should this be possible? 2 app, 2 different EJB class
> >
> >
> > Attached project, if needed to reproduce the situation
> >
> > Sorry for google traductor,
>
--
--
Jean-Louis Monteiro
http://twitter.com/jlouismonteiro
http://www.tomitribe.com
Re: Bug? 2 Apps in Tomme 1.6.0 with same name EJB not deploy second App
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
1) no
2) no
3) yes http://tomee.apache.org/jndi-names.html
that's inheritance of old names we keep for compatibility
Romain Manni-Bucau
Twitter: @rmannibucau
Blog: http://rmannibucau.wordpress.com/
LinkedIn: http://fr.linkedin.com/in/rmannibucau
Github: https://github.com/rmannibucau
2014-04-16 4:32 GMT+02:00 Luis Castro <lu...@animotion.com.mx>:
> Hello.
>
>
> Environment TOMEE 1.6.0 and OpenEJB Provided
>
> <dependencies>
>
> <!-- tomee-->
> <dependency>
> <groupId>org.apache.openejb</groupId>
> <artifactId>apache-tomee</artifactId>
> <version>1.6.0</version>
> <classifier>webprofile</classifier>
> <type>zip</type>
> <scope>provided</scope>
> </dependency>
>
> Use Case 1#
>
> Name aplication "App One" ;
>
> "App One" have the class EJB "UsuariosFacadeLocal" in package
> com.appone.businesslayer.ejbs.local
>
> Code Example :
> package com.appone.businesslayer.ejbs;
>
> import com.appone.businesslayer.ejbs.local.UsuariosFacadeLocal;
> import javax.ejb.Stateless;
> import javax.ejb.TransactionManagement;
> import javax.ejb.TransactionManagementType;
>
> @Stateless
> @TransactionManagement(TransactionManagementType.CONTAINER)
> public class UsuariosFacade implements UsuariosFacadeLocal {
>
> @Override
> public String hello() {
> return this.getClass().getCanonicalName();
> }
> }
>
> And deployed and run successful
>
> Another app inside same server Tomee 1.6.0
> Name aplication "App Two" ;
>
> "App TWO" have the class EJB "UsuariosFacadeLocal" in package
> com.apptwo.businesslayer.ejbs.local
>
> And deployed and run ERROR:
>
> Grave: Application cannot be deployed as it contains deployment-ids which
> are in use: app: /home/programacion/animotion
> app/App1/target/AppOne-1.0-SNAPSHOT
> abr 15, 2014 8:48:12 PM org.apache.openejb.assembler.classic.Assembler
> createApplication
> Grave: DeploymentId already used: UsuariosFacade
> abr 15, 2014 8:48:12 PM org.apache.tomee.catalina.TomcatWebAppBuilder
> startInternal
> Grave: Unable to deploy collapsed ear in war
> StandardEngine[Catalina].StandardHost[localhost].StandardContext[/AppOne]
> org.apache.openejb.DuplicateDeploymentIdException: Application cannot be
> deployed as it contains deployment-ids which are in use: app:
> /home/programacion/animotion app/App1/target/AppOne-1.0-SNAPSHOT
> UsuariosFacade
>
>
> I can solved this situation with add anotation "name" in second App
>
> @Stateless(name = "UsuariosFacadeAppTwo")
>
>
> in EAR must not have the same class names, I understand. ,
>
> But in 2 different app?
>
> Questions:
>
> 1) Its Bug ?
> 2) I am making a mistake in the specification?
> 3) Should this be possible? 2 app, 2 different EJB class
>
>
> Attached project, if needed to reproduce the situation
>
> Sorry for google traductor,