You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by Vishal Kaushal <vi...@yahoo.com> on 2006/03/01 11:07:47 UTC

[mina] Can MINA be deployed as an inbound Resource Adapter (JCA 1.5) within a J2EE container?

      Hi,

Can MINA be deployed as an Inbound Resource Adapter (JCA 1.5) within a J2EE container? 

Some details on the scenario:

1. Through the new JCA 1.5 specification, we can now extend the "application server" capabilities to make it act like a normal server accepting client connections on TCP sockets (for eg. a telnet server can be implemented through the application server). In short, this is achieved by writing a resource adapter and deploying it in the J2EE container where the MDB (Message Driven Bean) to implement the actual processing of the client connection is also deployed. On receiving incoming client packets, the RA invokes the MDB and hence the client requests are serviced. The RA thus deployed acts like a connection manager for clients connecting to a particular TCP port, also taking advantage of pooling mechanisms provided by the app server (since RA is deployed within a J2EE container). 

2. My question is, Can I use MINA so that it behaves like an inbound RA deployed within the J2EE container so that it can accept client connections and invoke the MDB deployed in the same container?

3. The problem I can see there is that the app server has its own pooling mechanisms and MINA has its own pooling mechanisms. How will they work together? Also, a resource adapter is required to adhere to some system contracts making it use the facilities provided by the J2EE container. If MINA is to be dpeloyed as the resource adapter, how will it implement the system contracts?

I would be grateful to you if you can enlighten me in this regard.

Kindly Note: My question is NOT "How to make a resource adapter FOR mina so that it can work with a J2EE component". Rather, I want to know whether MINA can be deployed within a J2EE container as a resource adapter so as to provide the above mentioned functionality.

Thanks and regards,
Vishal.
		
---------------------------------
Yahoo! Mail
Bring photos to life! New PhotoMail  makes sharing a breeze. 

Re: [mina] Can MINA be deployed as an inbound Resource Adapter (JCA 1.5) within a J2EE container?

Posted by Maarten Bosteels <ma...@dns.be>.
posting four times seems to work :-)
He finally got an answer. well, sort of.

On 3/1/06, Alex Cruise <al...@cluonflux.com> wrote:
> Vishal Kaushal wrote:
>
> >Can MINA be deployed as an Inbound Resource Adapter (JCA 1.5) within a J2EE container?
> >
> >
> I have a great idea!  Why don't you post your question a fourth time;
> you might get lucky.  ;)
>
> Or better yet, just try it.  It seems to me that MINA is pretty
> flexible, both in terms of its lifecycle, and the variety of protocols
> and application state machines it will support.
>
> As for whether the app server will let the number of threads usable by a
> Resource Adapter be completely unrelated to the number of requests... If
> it won't, you won't be able to do anything asynchronous with MINA or any
> other async IO framework.
>
> I'd be surprised if this kind of constraint were hardwired into EE 5,
> considering the sharp turn towards sanity the whole thing has taken in
> the last year or two.
>
> -0xe1a
>

Re: [mina] Can MINA be deployed as an inbound Resource Adapter (JCA 1.5) within a J2EE container?

Posted by Alex Cruise <al...@cluonflux.com>.
Vishal Kaushal wrote:

>Can MINA be deployed as an Inbound Resource Adapter (JCA 1.5) within a J2EE container? 
>  
>
I have a great idea!  Why don't you post your question a fourth time; 
you might get lucky.  ;)

Or better yet, just try it.  It seems to me that MINA is pretty 
flexible, both in terms of its lifecycle, and the variety of protocols 
and application state machines it will support. 

As for whether the app server will let the number of threads usable by a 
Resource Adapter be completely unrelated to the number of requests... If 
it won't, you won't be able to do anything asynchronous with MINA or any 
other async IO framework. 

I'd be surprised if this kind of constraint were hardwired into EE 5, 
considering the sharp turn towards sanity the whole thing has taken in 
the last year or two.

-0xe1a