You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Paul French <pa...@frenchiesystems.com> on 2006/08/02 12:33:49 UTC

connections or sessions

Does anyone know the pros or cons in creating connections or sessions ?

Say 2 connections with 1 session each 

or

1 connection with 2 sessions ?

I am wondering why most connection pools create a pool of connections and
not a pool of sessions instead.
-- 
View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5611329
Sent from the ActiveMQ - User forum at Nabble.com.


Re: connections or sessions

Posted by Paul French <pa...@frenchiesystems.com>.
Okay dokey!

Mind you, I would have preferred your boring shorter version :@)


-- 
View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5618941
Sent from the ActiveMQ - User forum at Nabble.com.


Re: connections or sessions

Posted by Hiram Chirino <hi...@hiramchirino.com>.
They do acomplish the same thinig, just using different interface
contracts.  I could go into the details but they are horribly borring.
 Please read the Application Server Framework section of the JMS
1.0.2b spec and compare to the JCA inbound stuff.

On 8/2/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> I think understand what you are saying but I also thought JCA 1.5 relied on
> app server or lightweight contanier to provide a thread pool (work manager I
> believe) so that the app server is still in control of all the threads being
> created. What's the difference?
> --
> View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5616344
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: connections or sessions

Posted by Paul French <pa...@frenchiesystems.com>.
I think understand what you are saying but I also thought JCA 1.5 relied on
app server or lightweight contanier to provide a thread pool (work manager I
believe) so that the app server is still in control of all the threads being
created. What's the difference?
-- 
View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5616344
Sent from the ActiveMQ - User forum at Nabble.com.


Re: connections or sessions

Posted by Hiram Chirino <hi...@hiramchirino.com>.
The Session Pools they refer to were an optional part of the 1.0.2 JMS
spec that allowed applications servers to pool jms sessions.  Why?
because each JMS session typically requires a dedicated dispatch
thread (to deliver to MDBs) associated with it and most app servers
want to be in control of thread creation.  With the advent of JCA 1.5,
the inbound contracts provide a much better way to interface JMS
provides and MDBs so the  Session Pool stuff has fallen out of favor.
But in short, the connection/session pooling that we were talking
about and the Session Pool stuff that document talks about are not the
same stuff.

On 8/2/06, Paul French <pa...@frenchiesystems.com> wrote:
>
> So why does Jencks for example create a pool of connections ? I know it pools
> sessions producers/consumers as well but in general if I use Jencks I will
> have many connections. There must be a reason? I've googled all over the
> place and I did see a quote on a web logic site which made no sense to me
> but it might to you
>
> http://edocs.bea.com/wls/docs81/jms/implement.html#1298531
>
>
>
> > Note: Session pools are now used rarely, as they are not a required part
> > of the J2EE specification, do not support JTA user transactions, and are
> > largely superseded by message-driven beans (MDBs), which are simpler,
> > easier to manage, and more capable. For more information on designing
> > MDBs, see "Designing and Developing Message-Driven Beans" in Programming
> > WebLogic Enterprise JavaBeans
> >
> --
> View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5614990
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 
Regards,
Hiram

Blog: http://hiramchirino.com

Re: connections or sessions

Posted by Paul French <pa...@frenchiesystems.com>.
So why does Jencks for example create a pool of connections ? I know it pools
sessions producers/consumers as well but in general if I use Jencks I will
have many connections. There must be a reason? I've googled all over the
place and I did see a quote on a web logic site which made no sense to me
but it might to you 

http://edocs.bea.com/wls/docs81/jms/implement.html#1298531



> Note: Session pools are now used rarely, as they are not a required part
> of the J2EE specification, do not support JTA user transactions, and are
> largely superseded by message-driven beans (MDBs), which are simpler,
> easier to manage, and more capable. For more information on designing
> MDBs, see "Designing and Developing Message-Driven Beans" in Programming
> WebLogic Enterprise JavaBeans
> 
-- 
View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5614990
Sent from the ActiveMQ - User forum at Nabble.com.


Re: connections or sessions

Posted by James Strachan <ja...@gmail.com>.
Sessions are cheap so create lots of 'em. You can create lots of
connections if needed, but each connection in ActiveMQ creates a new
socket so typically you only need 1 connection per JVM.


On 8/2/06, Paul French <pa...@frenchiesystems.com> wrote:
> Does anyone know the pros or cons in creating connections or sessions ?
>
> Say 2 connections with 1 session each
>
> or
>
> 1 connection with 2 sessions ?
>
> I am wondering why most connection pools create a pool of connections and
> not a pool of sessions instead.
> --
> View this message in context: http://www.nabble.com/connections-or-sessions-tf2039029.html#a5611329
> Sent from the ActiveMQ - User forum at Nabble.com.
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/