geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Jencks <>
Subject Re: J2EE Connector 1.5 Specification
Date Thu, 25 Sep 2008 08:24:41 GMT

On Sep 25, 2008, at 1:03 AM, Simon Aquilina wrote:

> Hi David,
> Thanks for your reply. I started reading the J2EE Connector 1.5  
> Specification yesterday and hope this will help me to better  
> understand how J2EE connectors work and thus use the maximum out of  
> them :)
> To say the truth I am interested in building a connector which is  
> able to receive inbound and send outbound messages; in other words a  
> remote client would be able to establish a connection and send  
> messages to an EIS deployed on the application server and the EIS  
> would (also) be able to establish a connection and send messages to  
> the remote client. When I started developing my connector for Tomcat  
> I was trying to achieve this. Due to my (lack) of experiance I  
> thought this was not part of the J2EE connector specification; now  
> that I read the documentation it seems it is.
> My main aim is to find an application server which I can use as the  
> base for any network solution I want to develop (not only web  
> applications).
> When I developed small network applications I realised that most of  
> the time all my client/server application work exactly in the same  
> way and very similar to how a web/application server works. However,  
> since I mostly developed web applications, I thought that web/ 
> application servers could only handle inbound messages (this was  
> before I read the first chapters of the J2EE connector  
> specification). For this reason I tried to develop a protocol  
> handler on Tomcat that was able to estable a connection with a  
> remote client and thus make it able to handle inbound and outbound  
> messages. Then after hitting a brick wall with Tomcat I did some  
> more research and found Geronimo. I want to continue on Geronimo  
> now; also because it is highly modularised which I like.
> The sceanrio I have in mind is as follows:
> Client (A) --[send message]--> EIS --[send messages]--> Client (B) -- 
> [send confirm message]--> EIS --[send confirm message]--> Client A
> This means that asynchronus communication would be a very intresting  
> concept :)

I think either jms or remote ejbs will do what you want with no  
infrastructure/middleware coding on your part.

I'm not entirely sure you are using "asynchronous" in its usual  
meaning.  With (asynchronous) jms you'd have a thread in client A that  
would send a message.  As soon as it is sent the thread will get  
control again (before the message is delivered) and can continue with  
other work.  The message could be received by an MDB B which would  
process it and possibly send one or more messages in response, to any  
destination.  A could have another thread listening for responses on  
this destination, or the original thread could listen (and block)  
waiting for a resonse.

If (as your diagram indicates) you want A to receive a response before  
continuing with other work, I think EJBs alone will do what you want.   
A would look up in jndi an ejb business interface and would call  
appropriate methods on it.  The ejb (B) would process the message  
(method call arguments) and return the response.  If A is not a java  
client you can use CORBA to communicate with a (java) ejb, although  
this is not the easiest thing to get working ever invented.

Another option if you need looser coupling is jaxws web services which  
among other things can provide access to ejbs, where the request and  
response messages are xml documents.  This is a rather large subject  
to try to describe in an email however.

In my experience j2ca outbound connectors are mostly useful when you  
need to communicate with a system you have little control over such as  
an existing database or messaging system.  If you are writing both the  
client and server there is almost always a more convenient, flexible,  
and easier solution.

Hope this is helpful
david jencks

> I do not have a dead line for this; for me the most important thing  
> is to learn. So feel free to suggest any reading. I am also happy to  
> read example code since I feel this helps me better to understand  
> how things work :)
> Thanks again,
> Simon J.
> From:
> To:
> Subject: Re: J2EE Connector 1.5 Specification
> Date: Wed, 24 Sep 2008 09:09:33 -0700
> On Sep 24, 2008, at 5:36 AM, Simon Aquilina wrote:
> Hi Juergen,
> Thanks for your quick reply. That is very similar to what I want to  
> try and achieve and the concept is very similar to the one I was  
> trying to achieve on Tomcat! Is there something like this provided  
> by the Apache Software Foundation?
> Based on the level of writing in the documentation I would be  
> careful using txconnect. I only looked at the documentation for a  
> couple minutes.  While I did not see any of the glaring errors I  
> usually find in j2ca projects it looks to me as if there were quite  
> a few misleading statements.
> If you are looking for a framework for building outbound j2ca  
> connectors, there is also the codehaus tranql project which is under  
> asl 2.0.  Geronimo ships with the tranql db adapters to provide jdbc  
> connectivity.
> However, based on your original attempt to do something related to a  
> tomcat http connector I really doubt you are interested in an  
> outbound connector, which is designed to let your server program  
> connect to other programs such as a database, SAP, CICS, etc as a  
> client.
> You might possibly be interested in a j2ca inbound connector.  The  
> standard example of these is a jms implementation supplying messages  
> to mdbs.
> Perhaps you could explain what you are trying to do:
> - what the source of messages is
> - what transport and protocol they travel over
> - what the consumer of the messages is
> - whether the communication is synchronous (message receiver sends a  
> reply back to the message sender) or asynchronous (no reply to  
> messages, such as with MOM or jms)
> - which role(s) your server program will be playing
> - how many clients, servers, and messages you want to handle
> thanks
> david jencks
> Regards,
> Simon J.
> > Date: Wed, 24 Sep 2008 14:04:34 +0200
> > From:
> > To:
> > Subject: Re: J2EE Connector 1.5 Specification
> >
> > Have a look at
> > it might make your job a lot easier.
> >
> > On Wed, Sep 24, 2008 at 1:30 PM, Simon Aquilina  
> <> wrote:
> > > Hi,
> > >
> > > I am interested in developing a custom connector for Geronimo so  
> that the
> > > latter can communicate using a protocol different then Http. I  
> had started a
> > > similar project on Tomcat, however I then realised that Tomcat  
> treats all
> > > requests as Http requests internally.
> > >
> > > I therefore decided to focus my energy on Geronimo since this is  
> a real
> > > application server and J2EE certified.
> > >
> > > I thought that first of all I should read the J2EE Connector 1.5
> > > Specification. Is this the right place to start? Or Geronimo has  
> some other
> > > documentation which I should consider? I have tried the  
> Documentation
> > > section to see what is available but (like in the case of  
> Tomcat) I did not
> > > find much related to connectors.
> > >
> > > Also please do correct me if I say anything stupid. I am not an  
> expert
> > > programmer nor do I know how Geronimo works inside out. However  
> I am willing
> > > to do an effort and learn and am willing to put as much time as  
> needed to
> > > learn things correctly.
> > >
> > > Thanks and Regards,
> > > Simon J.
> > >
> > > ________________________________
> > > Explore the seven wonders of the world Learn more!
> Invite your mail contacts to join your friends list with Windows  
> Live Spaces. It's easy! Try it!
> Invite your mail contacts to join your friends list with Windows  
> Live Spaces. It's easy! Try it!

View raw message