Hello Christian,

Thanks for you feedback.

On Mon, Oct 1, 2012 at 4:42 AM, zuff <[hidden email]> wrote:

> Hi All,
>
>   I would like to seek advise on what is the suggested guideline for
> handling temporary jms topic in a EAR backing bean.
>
>   The scenario is as such.
>
>   Server 1:
>   One ear project deployed on Weblogic, one of the backing beans allow
> user
> to publish a request that submit a jms topic.
>
>
>   Server 2:
>   Camel running and consuming from the route.  e.g.
> from("activemq:topic:doWork)
>   Triggered an external system (Server 3) to process the request and
> response by saving xml file into a folder.
>    Route picked up the files and continue processing, (Need to reply to a
> temporary topic if neccessary.)
>
> My questions.
> a. How do i configure Server 1 to listen to the temproary topic?
... [show rest of quote]

You are sure you have to use a topic and not a queue?
Camel will create the tmp. destination for you, if you use the InOut MEP.

Zuffi Update: Hmm, I will go discuss with the PM and get back again.

> updating
> the route? how do i remove it from the route after consuming?

Camel will do this for you because it consumes the message.

Zuffi Update: I'm actually using Icefaces, and I new to Camel, therefore I'm
not sure how do I configure the route to allow the backing beans to receive
the temp-queue response. Will appreciate a simple demo.

> using
> @Dispose(i heard its not guranteed to run) ?
>
I didn't get this.

Zuffi Update: In an simple POC , I actually create the tempTopic and managed
to get a separated camel project to reply to it. I closed this
temporaryTopic session and connection on the @Destory in the icefaces
backing beans. 

> - Do I have to create a JMS connection and create an temporaryTopic? It's
> a
> bit counter-productive.
>
You have to configure the connection factory and Camel will create the
connection and Queue/Topic (I assume you use ActiveMQ).

>
> b. If i not mistaken, camel seems to generate a temp-queue for JMSReplyTo,
> how do i make use of this?
>
Use the InOut MEP. I think you should have a look into the JMS unit tests:
https://svn.apache.org/repos/asf/camel/trunk/components/camel-jms/

>
> c.  I guess since Route 1 and Route 2 are separated, my intention is to
> have
> a map to keep track of the requestID and the  JMSReplyTo in a Map, but are
> there any better ways to resolve this mapping?
>
Yes. Camel will handle this for you. Check out the unit tests or the
examples Camel provides: http://camel.apache.org/examples.html

Zuffi's Update: Actually between Route 1 and Route 2, there is a third party
external system, I understand that there is a Aggreator(2) EIP, however, due
to time constraint and "legacy" issue, I couldn't migrate the code to make
use of this feature.

>
> d. Are there any better way to do it?
>
Yes, I think so. Why do you plan to use a file to connect server 3 and
server 2?

Zuffi's Update: 
Server 1 is our Webapp running weblogic and hosting and icefaces ear project
Server 2 is running a standalone project that consume request from various
sources. (other webApps or standalone project)  => Generate an xml file and
put into the In folder(s) of server 3.
Server 3 is a 3rd party application that read the request from its in
folder(s) and place the response into the out folder(s)

>
> Thanks and Best Regards,
> Zuff 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Best-Practise-for-Dynamic-Topic-in-Ear-Project-tp5720288p5720342.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to