Author |
Message
|
matuwe |
Posted: Mon Jun 06, 2011 11:10 pm Post subject: Compute Node with Data Source fails if database not availabl |
|
|
 Master
Joined: 05 Dec 2007 Posts: 296
|
Hi
I have developed my flows to use CACHE "Shared ROWS" hoping to only read the database once , load the cache and never hit the DB again till the next cache refresh.
But now I notice, if the database is not available the compute node will fail because it seems like it is trying to connect to the database even though it is going to use cache?? Does it mean the compute node always connects to the database? Can this affect my application performance?? Is there anyway that I can bypass this problem and make sure the application doesn't fail because DB is not available?? Can PASSTHRU help ?? Is the database failing because on the compute node I selected the check box that says throw DB Exception??
I am using Broker 7 and MQ 7
 |
|
Back to top |
|
 |
j.f.sorge |
Posted: Mon Jun 06, 2011 11:24 pm Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
You may use a separate FilterNode to check whether cache in SHARED ROW has already been filled in order to prevent flow from connecting to database. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 07, 2011 12:19 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
Is the database failing because on the compute node I selected the check box that says throw DB Exception??
|
You could always unckeck it and handle the exception yourself. However there are many many different possible DB error codes that might be returned in the event of a DB going away either intentionally or accidentially. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Tue Jun 07, 2011 1:04 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
smdavies99 wrote: |
Quote: |
Is the database failing because on the compute node I selected the check box that says throw DB Exception??
|
You could always unckeck it and handle the exception yourself. However there are many many different possible DB error codes that might be returned in the event of a DB going away either intentionally or accidentially. |
But if you uncheck the box it will still fail if connection to database could not be established. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 07, 2011 1:46 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
j.f.sorge wrote: |
But if you uncheck the box it will still fail if connection to database could not be established. |
True, it will fail but you can handle it yourself rather than relying on the auto exception generation handing of the broker. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
j.f.sorge |
Posted: Tue Jun 07, 2011 2:47 am Post subject: |
|
|
Master
Joined: 27 Feb 2008 Posts: 218
|
smdavies99 wrote: |
j.f.sorge wrote: |
But if you uncheck the box it will still fail if connection to database could not be established. |
True, it will fail but you can handle it yourself rather than relying on the auto exception generation handing of the broker. |
Here at WMB 6.1 it fails with an Exception before entering the Node and does not give you the control to handle e. g. value of SQLSTATE variable. _________________ IBM Certified Solution Designer - WebSphere MQ V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.0
IBM Certified Solution Developer - WebSphere Message Broker V6.1
IBM Certified Solution Developer - WebSphere Message Broker V7.0 |
|
Back to top |
|
 |
smdavies99 |
Posted: Tue Jun 07, 2011 4:15 am Post subject: |
|
|
 Jedi Council
Joined: 10 Feb 2003 Posts: 6076 Location: Somewhere over the Rainbow this side of Never-never land.
|
Quote: |
Here at WMB 6.1 it fails with an Exception before entering the Node and does not give you the control to handle e. g. value of SQLSTATE variable.
|
That is because Broker tries to be helpful.
In the background it looks ahead and tries to open an DB connections that are unopened.
The failure you are seeing is due to that kind hearted lookahead. You could set the DSN property to another one of the same DB Type and then the code will trap the error.
I seem to recall raising a PMR on a topic not too dissimilar to this in V5.0 days. _________________ WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995
Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions. |
|
Back to top |
|
 |
|