ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » message flow thread

Post new topic  Reply to topic
 message flow thread « View previous topic :: View next topic » 
Author Message
paustin_ours
PostPosted: Mon Mar 24, 2014 6:44 am    Post subject: message flow thread Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

when a message flow is deployed it creates a thread in the EG. With only one instance of the flow running. Is this the only thread that will be alive for the entire time of the life of the flow.

If i stop/start the flow, this would create a new thread in my understanding but is it correct in assuming that a deployed flow will always be running as that one thread. If correct, does this hold good even when i use a JCN?

ANy thoughts?
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Tue Mar 25, 2014 2:52 am    Post subject: Re: message flow thread Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

paustin_ours wrote:
when a message flow is deployed it creates a thread in the EG. With only one instance of the flow running. Is this the only thread that will be alive for the entire time of the life of the flow.

If i stop/start the flow, this would create a new thread in my understanding but is it correct in assuming that a deployed flow will always be running as that one thread. If correct, does this hold good even when i use a JCN?

ANy thoughts?


This begs the question as to why do you need that information. What exactly are you trying to do?
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
paustin_ours
PostPosted: Wed Mar 26, 2014 12:14 pm    Post subject: Reply with quote

Yatiri

Joined: 19 May 2004
Posts: 667
Location: columbus,oh

There is usage of threadlocal variable inside JCN to store database connection and reuse it until a batch insert is done in one of our applications. Trying to think of scenarios this could cause problems.
First wanted to make sure that a message flow is always that one thread unless otherwise additonal instances are used.
Back to top
View user's profile Send private message Yahoo Messenger
fjb_saper
PostPosted: Thu Mar 27, 2014 5:13 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

ThreadLocal keeps your information thread safe, that is unique within the flow INSTANCE.
You need to use this for well known "unsafe" implementations like DateFormat etc...

I am not sure that your use of ThreadLocal does what you intend...
Obviously it would be better to have a commit every x many messages in your batch and record the last commit and record # in a message on a queue? This way you could restart the batch at the last commit...

Have fun
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Tibor
PostPosted: Thu Mar 27, 2014 5:33 am    Post subject: Reply with quote

Grand Master

Joined: 20 May 2001
Posts: 1033
Location: Hungary

I'm not a Java guru, but did you mind using a singleton class for the connection?
Back to top
View user's profile Send private message
fjb_saper
PostPosted: Thu Mar 27, 2014 5:37 am    Post subject: Reply with quote

Grand High Poobah

Joined: 18 Nov 2003
Posts: 20756
Location: LI,NY

Tibor wrote:
I'm not a Java guru, but did you mind using a singleton class for the connection?

Unpractical as you will need multiple instances of the connection throughout the life cycle of the flow instance... (Think differences between a transacted vs non transacted session in the same flow... )
_________________
MQ & Broker admin
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » message flow thread
Jump to:  



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP
 
 


Theme by Dustin Baccetti
Powered by phpBB © 2001, 2002 phpBB Group

Copyright © MQSeries.net. All rights reserved.