Author |
Message
|
mmarq |
Posted: Thu Oct 17, 2002 10:59 am Post subject: Retrieving datasource names from JavaNode |
|
|
Acolyte
Joined: 19 Sep 2002 Posts: 74 Location: Newton, MA
|
I'm developing a java node and I'm wondering if there is way for me to have the user specify datasource names in a similar way that compute nodes do (e.g., Add->Database->Data source and table name) and of course have a way to get it.
Can I set this up through attributes?
Thanks,
Melissa _________________ M Marquis |
|
Back to top |
|
 |
marko |
Posted: Thu Oct 17, 2002 11:10 am Post subject: |
|
|
Apprentice
Joined: 28 Feb 2002 Posts: 27
|
The interface for MbNode has a method, createSQLStatement(..), that takes a datasource name. You can add property to your custom node (eg. getDatasourceName(), setDatasouceName()), to allow a user to configure the datasource name for your node. |
|
Back to top |
|
 |
rksuresh |
Posted: Sat Nov 16, 2002 10:41 pm Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
I am planning to work on a java plugin which can call a stored procedure and sql statements. Since I have to handle multiple datasource, this is going to be an attribute from the plugin node.
I am just wondering how to call an Stored Procedure / SQL from the java node. Any Samples or information regarding this would be really great. |
|
Back to top |
|
 |
kirani |
Posted: Sun Nov 17, 2002 11:26 am Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Suresh,
Have a look at CREATE PROCEDURE statement in ESQL Reference manual. _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
rksuresh |
Posted: Mon Nov 18, 2002 7:32 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
Those are ESQL syntax to be used from Compute node, but I am looking for examples to call an stored procedure from java plugin node. |
|
Back to top |
|
 |
kirani |
Posted: Mon Nov 18, 2002 8:45 pm Post subject: |
|
|
Jedi Knight
Joined: 05 Sep 2001 Posts: 3779 Location: Torrance, CA, USA
|
Have you tried using createSQLStatement and execute methods in MbNode and MbSqlStatement classes resp.? _________________ Kiran
IBM Cert. Solution Designer & System Administrator - WBIMB V5
IBM Cert. Solutions Expert - WMQI
IBM Cert. Specialist - WMQI, MQSeries
IBM Cert. Developer - MQSeries
|
|
Back to top |
|
 |
lillo |
Posted: Tue Nov 19, 2002 2:05 am Post subject: |
|
|
Master
Joined: 11 Sep 2001 Posts: 224
|
I was interested in this issue and try something until I found this lines in the MbSqlStatement class.
Quote: |
MbSQLStatement provides support for accessing an external ODBC Database. An object of this class is created using one of the createSQLStatement() methods of MbNode.
Database access using JDBC is not supported.
|
Tell us if you could call the store procedure using jdbc.
Cheers, _________________ Lillo
IBM Certified Specialist - WebSphere MQ |
|
Back to top |
|
 |
rksuresh |
Posted: Tue Nov 19, 2002 8:02 am Post subject: |
|
|
Novice
Joined: 11 Apr 2002 Posts: 24
|
I am trying to find some examples for createSQLStatement and execute statements. Some of the examples from the newsgroup suggested that the statement should be exactly esql syntax. But for the stored procedure it is a two step process like register the stored procedure and then call it using the 'CALL statement'. I am still not clear how this would work.
If the stored procedure has got any output parameter then we can set it in the environment variable in the java node and retrieve it. |
|
Back to top |
|
 |
|