You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Daniel Cunha <da...@gmail.com> on 2014/12/04 14:11:58 UTC

TomEEClusterListener

Hi folks,

I'm reading about TomEE in cluster and etc..

I looked this class:

https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java

This is a singleton?
I didn't understand very well that INSTANCE:
https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java#L43

-- 
Daniel Cunha (soro) <http://www.cejug.net>
Blog: http://www.danielsoro.com.br
Twitter: https://twitter.com/dvlc_
GitHub: https://github.com/danielsoro
LinkedIn:  http://www.linkedin.com/in/danielvlcunha

Re: TomEEClusterListener

Posted by Romain Manni-Bucau <rm...@gmail.com>.
this is to allow users to define it manually in server.xml

Singleton side of this class is not mandatory/important. That is just
to avoid to create N instances when no needed.


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2014-12-04 15:08 GMT+01:00 Daniel Cunha <da...@gmail.com>:
> Yup. If is a singleton, so I can't create another objects this type. This
> case, I can create many objects this type.
>
> On Thu, Dec 4, 2014 at 1:45 PM, Romain Manni-Bucau <rm...@gmail.com>
> wrote:
>
>> it is a "tomcat cluster" facade  to tomee deployer which is a singleton so
>> yes
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau
>> http://www.tomitribe.com
>> http://rmannibucau.wordpress.com
>> https://github.com/rmannibucau
>>
>>
>> 2014-12-04 14:11 GMT+01:00 Daniel Cunha <da...@gmail.com>:
>> > Hi folks,
>> >
>> > I'm reading about TomEE in cluster and etc..
>> >
>> > I looked this class:
>> >
>> >
>> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java
>> >
>> > This is a singleton?
>> > I didn't understand very well that INSTANCE:
>> >
>> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java#L43
>> >
>> > --
>> > Daniel Cunha (soro) <http://www.cejug.net>
>> > Blog: http://www.danielsoro.com.br
>> > Twitter: https://twitter.com/dvlc_
>> > GitHub: https://github.com/danielsoro
>> > LinkedIn:  http://www.linkedin.com/in/danielvlcunha
>>
>
>
>
> --
> Daniel Cunha (soro) <http://www.cejug.net>
> Blog: http://www.danielsoro.com.br
> Twitter: https://twitter.com/dvlc_
> GitHub: https://github.com/danielsoro
> LinkedIn:  http://www.linkedin.com/in/danielvlcunha

Re: TomEEClusterListener

Posted by Daniel Cunha <da...@gmail.com>.
Yup. If is a singleton, so I can't create another objects this type. This
case, I can create many objects this type.

On Thu, Dec 4, 2014 at 1:45 PM, Romain Manni-Bucau <rm...@gmail.com>
wrote:

> it is a "tomcat cluster" facade  to tomee deployer which is a singleton so
> yes
>
>
> Romain Manni-Bucau
> @rmannibucau
> http://www.tomitribe.com
> http://rmannibucau.wordpress.com
> https://github.com/rmannibucau
>
>
> 2014-12-04 14:11 GMT+01:00 Daniel Cunha <da...@gmail.com>:
> > Hi folks,
> >
> > I'm reading about TomEE in cluster and etc..
> >
> > I looked this class:
> >
> >
> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java
> >
> > This is a singleton?
> > I didn't understand very well that INSTANCE:
> >
> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java#L43
> >
> > --
> > Daniel Cunha (soro) <http://www.cejug.net>
> > Blog: http://www.danielsoro.com.br
> > Twitter: https://twitter.com/dvlc_
> > GitHub: https://github.com/danielsoro
> > LinkedIn:  http://www.linkedin.com/in/danielvlcunha
>



-- 
Daniel Cunha (soro) <http://www.cejug.net>
Blog: http://www.danielsoro.com.br
Twitter: https://twitter.com/dvlc_
GitHub: https://github.com/danielsoro
LinkedIn:  http://www.linkedin.com/in/danielvlcunha

Re: TomEEClusterListener

Posted by Romain Manni-Bucau <rm...@gmail.com>.
it is a "tomcat cluster" facade  to tomee deployer which is a singleton so yes


Romain Manni-Bucau
@rmannibucau
http://www.tomitribe.com
http://rmannibucau.wordpress.com
https://github.com/rmannibucau


2014-12-04 14:11 GMT+01:00 Daniel Cunha <da...@gmail.com>:
> Hi folks,
>
> I'm reading about TomEE in cluster and etc..
>
> I looked this class:
>
> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java
>
> This is a singleton?
> I didn't understand very well that INSTANCE:
> https://github.com/apache/tomee/blob/develop/tomee/tomee-catalina/src/main/java/org/apache/tomee/catalina/cluster/TomEEClusterListener.java#L43
>
> --
> Daniel Cunha (soro) <http://www.cejug.net>
> Blog: http://www.danielsoro.com.br
> Twitter: https://twitter.com/dvlc_
> GitHub: https://github.com/danielsoro
> LinkedIn:  http://www.linkedin.com/in/danielvlcunha