jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: JMS redirector
Date Thu, 20 Jun 2002 14:27:29 GMT
Hi Raj,

> -----Original Message-----
> From: Rajagopal. V [mailto:raja0576@yahoo.com]
> Sent: 20 June 2002 14:13
> To: Cactus Users List
> Subject: RE: JMS redirector (was RE: How do i enable Clover with
Cactus)
> 
> Vincent,
> I was taking a look at the Cactus Code yesterday to
> see how the HTTP and JSP Redirectors were done.

Hey that's great Raj !

Have you already looked at the CACTUS_14_JMS_BRANCH branch as there is
already some code ?

> Basically this is done as a URL Forward to the Server
> Side where the objects are reconstructed..

Actually the protocol is HTTP and the way Cactus passes the information
between client and server side is by putting some cactus-internal HTTP
parameters put in the URL.
 
> Now for JMS, we need to find a protocol by which we
> could transfer the message objects from client to
> server.

The goal of the JMS redirector is that the Redirector is itself an MDB
so that it has access to a JMS Message object and to a
MessageDrivenSession object, in the same spirit as the servlet
redirector is a servlet, the JSP redirector is a jsp and the filter
redirector is a filter.

Now, in order to pass information from the client side to the server
side, I had in mind to simply stick them in some message headers.

I think you should have a look at the code I started as there is already
quite a few things there (ok, far from being finished :-) but it should
give some ideas).

> This is what i have in mind right now about
> implementing this..
> a) Im not sure if the beginXXX and endXXX methods can
> be used for JMS Redirector

Yes and no. beginXXX() is fine. It sends the JMS request to the
redirector MDB. endXXX() provides test writer with the returned message.

Thus, what we need to be able to define on the client side is :

- what is the queue to send onto ? I would suggest as a best practice to
use a test queue. The redirector MDB will listen on that test queue

- what is the queue that the client side will listen to ? This is a bit
more complex. First, it has to be optional as the code under test is not
always sending back answers as JMS message ! It could simply not send
back anything. Then, it has to be a real queue as the code under test is
the production code and will send back messages on that queue. As a
first implementation, I would suggest listening only on one queue. Maybe
we could decide that if the user write an endXXX method it means he is
expecting some response and thus only wait for a jms response in that
case (of course setting a timeout - need to be configurable).

> b) In the testXXX, Create all the Mesage Header
> Properties through the JMSRequest Objects.., create
> the message(And the properties)

no. This cannot be ! :-)

testXXX is executed on the server side ... beginXXX is fine I think, why
not ?

> c) In the Serverside redirector, create the Context
> Parameters(from a properties file) and call the
> testXXX.
> Im stuck at this point. How do we get a Reply message
> from the JMS Listener? We cannot expect eveery message
> listener to send something back using the
> setJMSReplyTo...
> 

see above.

> Any thoughts on this. Am I way off?

A little but this may be more related to terminology.

Thanks for your help!
-Vincent
 
> 
> Thanks
> Raj
> 
> --- Vincent Massol <vmassol@octo.com> wrote:
> >
> >
> > > -----Original Message-----
> > > From: Vincent Massol [mailto:vmassol@octo.com]
> > > Sent: 13 June 2002 08:35
> > > To: 'Cactus Users List'
> > > Subject: JMS redirector (was RE: How do i enable
> > Clover with Cactus)
> > >
> > > Raj,
> > >
> > > WRT the JMS redirector. Several things :
> > >
> > > 1/ I have already done the refactoring of the
> > client side of Cactus so
> > > that it is easy to add any type of client.
> > >
> > > 2/ I will commit what I have written today in CVS
> > in a branch called
> > > CACTUS_14_JMS_BRANCH so that we will still be able
> > to deliver version
> > > 1.4 without it (if it's done fast enough it will
> > go in 1.4, otherwise
> > it
> > > will go in 1.5)
> >
> > done. You can play with it now ! :-)
> >
> > >
> > > Here is the status of the JMS stuff I have written
> > :
> > >
> > > *
> >
> framework/src/java/j2ee13/org/apache/cactus/JmsRequest.java
> > > (equivalent of WebRequest)
> > >
> > > *
> >
> framework/src/java/j2ee13/org/apache/cactus/JmsTestCase.java
> > > (equivalent of ServletTestCase)
> > >
> > > *
> >
> framework/src/java/j2ee13/org/apache/cactus/client/JmsClient.java
> > > (equivalent of HttpClient)
> > >
> > > *
> > >
> >
>
framework/src/java/j2ee13/org/apache/cactus/client/JmsClientHelper.java
> > > (equivalent of the HttpClientHelper)
> > >
> > > *
> > >
> >
>
framework/src/java/j2ee13/org/apache/cactus/server/MessageDrivenBeanImpl
> > > icitObjects.java (equivalent of the web implicit
> > objects)
> > >
> > > *
> > >
> >
>
framework/src/java/j2ee13/org/apache/cactus/server/MessageDrivenBeanRedi
> > > rector.java (the JMS redirector)
> > >
> > > *
> >
> framework/src/java/j2ee13/org/apache/cactus/util/JmsConfiguration.java
> > > (equivalent to ServletConfiguration and such)
> > >
> > > These classes are not finalized at all but provide
> > a framework to
> > start
> > > working on.
> > >
> > > I have also started a new sample-ejb subproject
> > that is supposed to be
> > > the counter of sample-servlet but for EJBs. I had
> > started with WL 6.1
> > as
> > > this is server I know the best for JMS
> > configuration.
> > >
> > > Thank very much for your help. Do not hesitate to
> > ask if there is
> > > something you don't understand.
> > >
> > > Cheers,
> > > -Vincent
> > >
> > > > -----Original Message-----
> > > > From: Rajagopal. V [mailto:raja0576@yahoo.com]
> > > > Sent: 12 June 2002 22:32
> > > > To: Cactus Users List
> > > > Subject: RE: How do i enable Clover with Cactus
> > > >
> > > > Hi Vincent,
> > > > I will try the clover thing tonite. Its really
> > neat to
> > > > see the number of methods, loc,and error status.
> > > >
> > > > Regarding JMS Interceptor, I would definitely
> > like to
> > > > participate in developing one. I was actively
> > into the
> > > > Cactus source code some time back(when 1.3 was
> > > > released) and then things started going crazy at
> > > > work..
> > > >
> > > > Let me know how i can contribute. Is there
> > something
> > > > checkedin CVS for the JMS interceptor that i can
> > look
> > > > into ? Last time I discussed this with you(some
> > months
> > > > back), you said you wanted to change the way the
> > > > interceptors were written.. Is there a new
> > design
> > > > available now?
> > > >
> > > > Thanks
> > > > raj
> > > >
> > > > --- Vincent Massol <vmassol@octo.com> wrote:
> > > > > Hi Raj,
> > > > >
> > > > > If you have the Cactus sources from CVS,
> > simply
> > > > > define a clover.enable
> > > > > Ant property in your top level
> > build.properties file
> > > > > and type "ant
> > > > > release". That will run the whole thing and
> > generate
> > > > > the Clover reports.
> > > > >
> > > > > You will need to have clover.jar and
> > velocity.jar in
> > > > > your anthome/lib
> > > > > directory.
> > > > >
> > > > > WRT the JMS interceptor, I have started work
> > on it
> > > > > but it will take me
> > > > > some time to get it finished. I wanted to
> > deliver
> > > > > quickly a 1.4 and
> > > > > continue working on the JMS stuff for 1.5. Do
> > you
> > > > > want to participate ?
> > > > > :-)
> > > > >
> > > > > Please ask if you have more questions on
> > Clover, I
> > > > > really like that
> > > > > tool! :-)
> > > > >
> > > > > Cheers,
> > > > > -Vincent
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: Rajagopal. V
> > [mailto:raja0576@yahoo.com]
> > > > > > Sent: 12 June 2002 21:16
> > > > > > To: cactus-user@jakarta.apache.org
> > > > > > Subject: How do i enable Clover with Cactus
> > > > > >
> > > > > > I saw the Clover Coverage Report with Cactus
> > 1.4..
> > > > > How
> > > > > > do I enable it? I havent looked much at the
> > Clover
> > > > > > website but thought i could get some tips on
> > how
> > > > > to
> > > > > > enable them for the Cactus Test Cases..
> > > > > >
> > > > > > Also is JMS Interceptor included for 1.4?
> > > > > >
> > > > > > Thanks so much
> > > > > > Raj
> > > > > >
> > > > > >
> > __________________________________________________
> > > > > > Do You Yahoo!?
> > > > > > Yahoo! - Official partner of 2002 FIFA World
> > Cup
> > > > > > http://fifaworldcup.yahoo.com
> > > > > >
> > > > > > --
> > > > > > To unsubscribe, e-mail:
> > <mailto:cactus-user-
> > > > > > unsubscribe@jakarta.apache.org>
> > > > > > For additional commands, e-mail:
> > > > > <mailto:cactus-user-
> > > > > > help@jakarta.apache.org>
> > > > >
> > > > >
> > > > >
> > > > > --
> > > > > To unsubscribe, e-mail:
> > > > >
> > <mailto:cactus-user-unsubscribe@jakarta.apache.org>
> > > > > For additional commands, e-mail:
> > > > > <mailto:cactus-user-help@jakarta.apache.org>
> > > > >
> > > >
> >
> === message truncated ===
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! - Official partner of 2002 FIFA World Cup
> http://fifaworldcup.yahoo.com
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>



--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message