On Sep 21, 2006, at 4:41 PM, Rajith Attapattu wrote:
Hi All,
JMS connections (and for that matter many other connections to
external
resources) could be expensive.
Sometimes a service or a reference with a JMS Binding may have to
use it's
own connection as it may use different messaging infrastructures.
But in most cases several services and references in a given SCA
runtime may
use the same messaging infrastructure and it would be a waste if every
service and reference creates it's own connection.
It would be better if we can reuse connections in such a situation.
How can I do this ?? If a JMS binding for a service or reference has
specified connection parameters like
initialContextFactoryName, providerUrl and connectionFactoryName
then I
would assume that it needs to connect to it's own messaging
infrastrucutre.
(so thats easy)
For the reuse case, Can I have JMSConnectionService which is yet
another
component that is given as a dependency to a service or reference?
This would be simillar to the RMIHost component defined for rmi
binding.
I think a lot will depend on the environment in which the JMS
implementation is running. For example, in a managed environment like
an appserver we might expect it to handle connection pooling/sharing
etc; if we are embedding a JMS broker inside Tuscany, it might offer
native pooling or low-overhead connections; or, we might provide our
own connection pooling.
In light of that, I think that something like a JMSConnectionService
would be the right kind of thing to have - it would provide the SPI
used by any Tuscany component that needed access to JMS and be
implemented by a bridge to the actual JMS implementation (as
determined by the host).
--
Jeremy
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]