You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Robert McKinnon <ro...@yahoo.com> on 2003/09/16 01:32:30 UTC

How to integrate Cocoon with JMS?

What is the quickest way to integrate Cocoon with JMS?

Is there a JMS Generator available anywhere?

In my case, I have the possibility to interact with services via JMS
topics on which I can receive and publish XML messages (not SOAP). I
would like to use Cocoon as a framework to produce HTML/WML/SVG
interfaces to the services.

I looking to find the easiest way to:

1) Connect to a number of JMS topics.

2) Receive XML in JMS text messages and generate SAX events for Cocoon.

3) Take SAX events generated by Cocoon and generate and publish JMS
text messages to specified topics.

Any advice is appreciated.

Regards,
Rob

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to integrate Cocoon with JMS?

Posted by Upayavira <uv...@upaya.co.uk>.
Geoff Howard wrote:

> Robert McKinnon wrote:
>
>> What is the quickest way to integrate Cocoon with JMS?
>>
>> Is there a JMS Generator available anywhere?
>>
>> In my case, I have the possibility to interact with services via JMS
>> topics on which I can receive and publish XML messages (not SOAP). I
>> would like to use Cocoon as a framework to produce HTML/WML/SVG
>> interfaces to the services.
>>
>> I looking to find the easiest way to:
>>
>> 1) Connect to a number of JMS topics.
>>
>> 2) Receive XML in JMS text messages and generate SAX events for Cocoon.
>>
>> 3) Take SAX events generated by Cocoon and generate and publish JMS
>> text messages to specified topics.
>>
>> Any advice is appreciated.
>
>
> Perhaps someone will have a different perspective, but...
>
> Integrating JMS into Cocoon can be very trivial (I've done it before 
> twice).  But what you are wanting to do is not as trivial.  What you 
> are looking for amounts to creating a new request/response environment 
> for Cocoon.
>
> The good news is that Cocoon is built for this and there are already 
> two "environments" built into the product: the servlet one that most 
> are familiar with and the CLI (command line interface) which does not 
> require any servlet environment to function.  The bad news is that 
> this may take a good understanding of more of the Cocoon internals 
> than you're willing to aquire.
>
> There may also be shortcuts (hacks) you could pursue if the full blown 
> solution proves unworkable for you.
>
> To start out, I'd look into the improved 2.1 CLI code, including 
> especially the Cocoon "Bean".  There are others on the list who may be 
> able to help you with that end of things if you let them know you are 
> looking to use the Cocoon Bean to create an alternative 
> request/response environment.  (the fact that JMS is involved is 
> almost totally irrelevant)
>
> As to hacks, you could create a totally separate JMS based program 
> which would convert from message topics to existing request 
> environments (cli or servlet) and invoke that from your code.  There 
> would be negative issues to deal with in this approach (like probably 
> performance).

Robert,

Do you want to create a web interface to your JMS system, or do you want 
to create HTML, WML, SVG from Java that you will use in other ways (i.e. 
not accessed by the user via HTTP)?

If it is the former, then, if what Geoff says is correct, it should be 
easy (not done it myself). If the latter, the CocoonBean is available to 
access Cocoon from Java code, giving it a URI and asking it to render it 
to a file (etc) for you. The CocoonBean interface is currently unstable 
(significant improvements planned), but the code works.

Regards, Upayavira

>
> HTH,
> Geoff
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Re: How to integrate Cocoon with JMS?

Posted by Geoff Howard <co...@leverageweb.com>.
Robert McKinnon wrote:
> What is the quickest way to integrate Cocoon with JMS?
> 
> Is there a JMS Generator available anywhere?
> 
> In my case, I have the possibility to interact with services via JMS
> topics on which I can receive and publish XML messages (not SOAP). I
> would like to use Cocoon as a framework to produce HTML/WML/SVG
> interfaces to the services.
> 
> I looking to find the easiest way to:
> 
> 1) Connect to a number of JMS topics.
> 
> 2) Receive XML in JMS text messages and generate SAX events for Cocoon.
> 
> 3) Take SAX events generated by Cocoon and generate and publish JMS
> text messages to specified topics.
> 
> Any advice is appreciated.

Perhaps someone will have a different perspective, but...

Integrating JMS into Cocoon can be very trivial (I've done it before 
twice).  But what you are wanting to do is not as trivial.  What you are 
looking for amounts to creating a new request/response environment for 
Cocoon.

The good news is that Cocoon is built for this and there are already two 
"environments" built into the product: the servlet one that most are 
familiar with and the CLI (command line interface) which does not 
require any servlet environment to function.  The bad news is that this 
may take a good understanding of more of the Cocoon internals than 
you're willing to aquire.

There may also be shortcuts (hacks) you could pursue if the full blown 
solution proves unworkable for you.

To start out, I'd look into the improved 2.1 CLI code, including 
especially the Cocoon "Bean".  There are others on the list who may be 
able to help you with that end of things if you let them know you are 
looking to use the Cocoon Bean to create an alternative request/response 
environment.  (the fact that JMS is involved is almost totally irrelevant)

As to hacks, you could create a totally separate JMS based program which 
would convert from message topics to existing request environments (cli 
or servlet) and invoke that from your code.  There would be negative 
issues to deal with in this approach (like probably performance).

HTH,
Geoff


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org