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 » Calling stored proc. in java compute node

Post new topic  Reply to topic
 Calling stored proc. in java compute node « View previous topic :: View next topic » 
Author Message
cvag
PostPosted: Sat Jun 20, 2009 3:32 am    Post subject: Calling stored proc. in java compute node Reply with quote

Centurion

Joined: 17 Mar 2008
Posts: 127

Hi,
Can anybody pls help out in calling the stored procedure in java compute node.

Thanks in Advance
Back to top
View user's profile Send private message
mymq
PostPosted: Sat Jun 20, 2009 6:04 pm    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

U can call the below JAVA method as below:
CALL retrieveLDAPAttr(LdapRef,EnvRef,ErrorMsg) into RetCode;


JAVA Method definition:

CREATE PROCEDURE retrieveLDAPAttr(IN LdpRef REFERENCE,INOUT EnvRef REFERENCE,OUT ErrorMsg CHAR)
RETURNS INT
LANGUAGE JAVA
EXTERNAL NAME
"com.michelin.eai.utils.JAVACLASS.JAVAMETHOD";
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
mqjeff
PostPosted: Sun Jun 21, 2009 7:54 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

I'm not sure that giving code to call a Java procedure that is very company and site specific from ESQL is a good answer for a question about how to use JDBC to call a database Stored Procedure from within Java.

CVAG - You can either use MbSqlStatement to call your Stored Procedure or standard JDBC. Presumably you are using Java because you are trained in Java and know it better than ESQL, otherwise you would just use the ESQL CALL statement. And being trained in Java means that you know how to use JDBC or know how to learn JDBC.
Back to top
View user's profile Send private message
mymq
PostPosted: Sun Jun 21, 2009 8:27 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

sorry. My mistake. Misunderstood it.
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
mymq
PostPosted: Tue Jun 23, 2009 7:10 pm    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

cvag - did u find a solution on the same?
_________________
--SRK--
Back to top
View user's profile Send private message Send e-mail
Gaya3
PostPosted: Tue Jun 23, 2009 10:48 pm    Post subject: Reply with quote

Jedi

Joined: 12 Sep 2006
Posts: 2493
Location: Boston, US

its easy to do that in JCN

Use the below format.... (Tested Code)

private static final String STORED_PROC_CALL = "PASSTHRU('CALL GAYATHRI()')";

MbSQLStatement statement = createSQLStatement (dataSourceName, STORED_PROC_CALL, MbSQLStatement.SQL_TRANSACTION_AUTO);.

comply with what Jeff pointed out
_________________
Regards
Gayathri
-----------------------------------------------
Do Something Before you Die
Back to top
View user's profile Send private message
mymq
PostPosted: Thu Jun 25, 2009 8:21 am    Post subject: Reply with quote

Centurion

Joined: 01 Mar 2007
Posts: 101
Location: US-Greenwille

Thankx Gaya3 (Mr.Arun)
_________________
--SRK--
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 » Calling stored proc. in java compute node
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.