You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Vincenzo D'Aniello <ic...@gmail.com> on 2017/01/05 11:06:13 UTC
Select Container for session beans
Hi, a simple question, and excuse me if it is very beginner.
By tutotial it is very simple to understand how to create container for
session beans, but I have not figured out how to select the specific
containers for each session bean.
For example, I create two stateless container: one with id 'stateless1', and
another with id 'stateless2';
<Container id = "stateless1" type = "STATELESS"> ...</Container>
<Container id = "stateless2" type = "STATELESS"> ...</Container>
How do I tell tomee the bean 'Stateless1' must use 'stateless1' container,
and that the bean 'Stateless2' must use container 'stateless2'?
@Stateless
public class Stateless1{..}
@Stateless
public class Stateless2{..}
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Select-Container-for-session-beans-tp4680855.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: Select Container for session beans
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Ok, for the exercise then:
<?xml version="1.0"?>
<openejb-jar xmlns="http://www.openejb.org/openejb-jar/1.1">
<ejb-deployment ejb-name="MyBean" deployment-id="MyBean"
container-id="My Stateless Container"/>
</openejb-jar>
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-01-05 13:58 GMT+01:00 Vincenzo D'Aniello <
ict.management.trexon@gmail.com>:
> Ok thanks, it was only to have full information on the subject. Happy
> holidays to all!
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Select-Container-for-session-beans-tp4680855p4680859.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>
Re: Select Container for session beans
Posted by Vincenzo D'Aniello <ic...@gmail.com>.
Ok thanks, it was only to have full information on the subject. Happy
holidays to all!
--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Select-Container-for-session-beans-tp4680855p4680859.html
Sent from the TomEE Users mailing list archive at Nabble.com.
Re: Select Container for session beans
Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi
You can do it in openejb-jar.xml but do you need it? It is quite rare to
actually use that these days
Le 5 janv. 2017 12:23, "Vincenzo D'Aniello" <ic...@gmail.com>
a écrit :
> Hi, a simple question, and excuse me if it is very beginner.
>
> By tutotial it is very simple to understand how to create container for
> session beans, but I have not figured out how to select the specific
> containers for each session bean.
>
> For example, I create two stateless container: one with id 'stateless1',
> and
> another with id 'stateless2';
>
> <Container id = "stateless1" type = "STATELESS"> ...</Container>
>
> <Container id = "stateless2" type = "STATELESS"> ...</Container>
>
> How do I tell tomee the bean 'Stateless1' must use 'stateless1' container,
> and that the bean 'Stateless2' must use container 'stateless2'?
>
> @Stateless
> public class Stateless1{..}
>
> @Stateless
> public class Stateless2{..}
>
>
>
> --
> View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Select-Container-for-session-beans-tp4680855.html
> Sent from the TomEE Users mailing list archive at Nabble.com.
>