tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gurkan Erdogdu <cgurkanerdo...@gmail.com>
Subject Re: Connector Architecture question: where are the network boundaries?
Date Thu, 11 Feb 2010 07:19:19 GMT
Hi Laird;

As you have already know (because of implementing JCA Adaptor :)),Clients
will use the JCA defined ConnectionFactory and Connection instances. They do
not use ManagedConnectionFactory or ManagedConnection instances directly.
JCA adapters impements its own ConnectionFactory and Connection interfaces
(defined in ra.xml) and register CF with application server JNDI tree.
Applications that want to use  server managed JCA adapter connections, gets
its CF from server JNDI tree and use it. That is why CF is
java.io.Serializable and javax.resource.Referenceable.

But application servers does not require to provide its database resources
directly to clients running from other VMs. (Exception is Java EE
Application Clients that can use application server resources.). Therefore
you could not get database related CF instance from remote client. (All of
these is defined in the Java EE 6 Platform Specification), but JMS adapters
gives client to get its ConnectionFactory from JNDI (This also permits
remote VMs)

In short, which resources could be used/not used outside of the Application
Server are defined in enterprise specifications. Main point is Java EE 6
platform specification.

I hope this helps;

--Gurkan

2010/2/10 Laird Nelson <ljnelson@gmail.com>

> This is really more of a specification question, I suppose, but given that
> the JCA feedback email address has been dead for years (!) I figured I'd
> ask
> the implementors of my favorite container.  :-)
>
> In an application-client-looking-up-a-resource-adapter-in-JNDI scenario,
> what JCA calls are guaranteed to result in network traffic?  What parts of
> the JCA infrastructure are guaranteed to be present on the client VM?
>
> I'm writing a resource adapter, complete with ManagedConnectionFactory
> implementation, ManagedConnection implementation, etc. etc.
>
> What I can't get through my thick head from the specification or the API is
> which parts of this little dance cross the wire.
>
> I feel like I can get a *hint* of which parts cross the wire by looking at
> the requirements for Serializable implementations.  It might stand to
> reason
> that an object such as a connection factory that is supposed to be
> Serializable will therefore be shipped off to a client VM, such as the one
> an application client might run on.
>
> But then other things--like the fact that a connection factory ultimately
> vends user connections which must maintain references to
> ManagedConnections,
> which do not have to be Serializable--suggest that it is a requirement of
> the application server that it effectively ship its entire connection
> pooling mechanism over the wire to the client VM.
>
> But THAT can't be right either.  Some app servers implement database
> connection pooling using the JCA.  And remote Java application clients
> using
> those application servers do not end up connecting to the database
> themselves.  That is, their database connections originate from the
> application server.
>
> Any insight here would be greatly appreciated.  Thanks!
>
> Best,
> Laird
>



-- 
Gurkan Erdogdu
http://gurkanerdogdu.blogspot.com

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message