Author |
Message
|
CHF |
Posted: Fri May 13, 2005 4:47 am Post subject: Java Plug-in node |
|
|
 Master
Joined: 16 Dec 2003 Posts: 297
|
Why can't we use JDBC in a java plug-in node?
I see that WMQI Programming guide says we can't use JDBC in a plug-in node, but don't say anything about reasons of not using it. _________________ CHF  |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 13, 2005 4:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Because you could interrupt the broker's transaction handling.
And that would be bad.
Also, you don't need to use JDBC. You can use the createSQLStatement function on the MbNode interface.
You should NOT think of Broker as an application server. It's, at best, a lightweight app server. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
CHF |
Posted: Fri May 13, 2005 5:01 am Post subject: |
|
|
 Master
Joined: 16 Dec 2003 Posts: 297
|
jefflowrey wrote: |
Because you could interrupt the broker's transaction handling.
And that would be bad.
Also, you don't need to use JDBC. You can use the createSQLStatement function on the MbNode interface.
You should NOT think of Broker as an application server. It's, at best, a lightweight app server. |
When using createSQLStatement we can only use ODBC connection... I am trying to connect to a Oracle DB using Java Plug-in node as WMQI 2.1 on z/os don't provide oracle connection.
But the problem is we don't have oracle ODBC drivers for z/os. Is there a way I can perform inquiries to a Oracle DB?
Thanks _________________ CHF  |
|
Back to top |
|
 |
Ian |
Posted: Fri May 13, 2005 5:46 am Post subject: |
|
|
Disciple
Joined: 22 Nov 2002 Posts: 152 Location: London, UK
|
No, a WMQI v2.1 broker running on zOS can not access Oracle (either via ESQL or via a Java plugin node).
This is because :
1. WMQI v2.1 and WBIMB v5 brokers running on zOS only support DB2
2. WMQI v2.1 and WBIMB v5 do not support JDBC calls from Java plugin nodes
My suggestion would be to submit a requirement to IBM requesting this functionality. _________________ Regards, Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 13, 2005 5:53 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
CHF wrote: |
But the problem is we don't have oracle ODBC drivers for z/os. Is there a way I can perform inquiries to a Oracle DB? |
Run broker on a different platform that does have Oracle drivers.
Get IBM to add support for Oracle on z/OS.
Federate your Oracle into DB2 on the mainframe.
Move the data from Oracle to DB2.
Write an EJB on a different box that runs your oracle queries, and write a broker plugin to call out to that EJB.
Write a standalone MQ program that acts as a request/reply server and does your oracle queries. Run that in a different environment that allows you to access Oracle, and use the Aggregation nodes to capture the oracle queries.
Write a standalone Java program that does your queries. Invoke it using RMI from a java procedure.
Consider asking a local architect for a site appropriate solution. _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
malammik |
Posted: Fri May 13, 2005 6:05 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
Ian wrote: |
2. WMQI v2.1 and WBIMB v5 do not support JDBC calls from Java plugin nodes
|
I tried using non jdbc type 4 driver from my custom node to connect to MySQL - no problem at all. IBM does not provide any transactioning capabilities to custom nodes so they have no business telling me what driver I can and cannot use. My Code and I will do whatever I want with it. Peace Out.  _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
malammik |
Posted: Fri May 13, 2005 6:07 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 13, 2005 6:18 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
malammik wrote: |
My Code and I will do whatever I want with it. Peace Out.  |
And when your code breaks a customer's transaction, and puts their entire production database into an inconsistent state at the beginning of a large batch, and they don't notice until the following morning...
It's all well and good to write plug-ins like this for local use. But I know that you write software that other people use - I hope you clearly document that you are using unsupported calls in your plugins.
 _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
Ian |
Posted: Fri May 13, 2005 7:00 am Post subject: |
|
|
Disciple
Joined: 22 Nov 2002 Posts: 152 Location: London, UK
|
I have done a little more research into this and found the following ...
WBIMB v5 topic "as01425_"
Code: |
ODBC restrictions
The ODBC environment cannot be accessed using the plug-in node interface. Database access must be performed using the supplied processing nodes, or by using the following implementation functions supplied for that purpose:
cniSqlCreateStatement
cniSqlExecute
cniSqlSelect
cniSqlDeleteStatement
Java Database Connectivity
Type 4 JDBC drivers are supported.
|
_________________ Regards, Ian |
|
Back to top |
|
 |
jefflowrey |
Posted: Fri May 13, 2005 7:04 am Post subject: |
|
|
Grand Poobah
Joined: 16 Oct 2002 Posts: 19981
|
Hrm.
Type 4 drivers are actually supported.
Carry on, Malammik, carry on! _________________ I am *not* the model of the modern major general. |
|
Back to top |
|
 |
malammik |
Posted: Fri May 13, 2005 7:19 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
|
Back to top |
|
 |
malammik |
Posted: Fri May 13, 2005 7:22 am Post subject: |
|
|
 Partisan
Joined: 27 Jan 2005 Posts: 397 Location: Philadelphia, PA
|
I knew they were supported. But if you create your own connection and your own statements meaning your whole jdbc shabang is outside the broker context which it should be because there is no benefit in it since there is no transaction support, you can run any driver you want type 4 or not type 4. _________________ Mikhail Malamud
http://www.netflexity.com
http://groups.google.com/group/qflex |
|
Back to top |
|
 |
|