Connection Pooling in Java Application for interacting with Websphere MQ

I have following infrastruture at my site.
1> Machine #1 has below
- Websphere MQSeries 6.0 (client setup - Slim Client)
- OS = Windows 2003
- i/p address : 10.1.11.10
- Tomcat web server 5.5
- No Websphere Application Server.
2> Machine #2 has below
- Websphere MQSeries 6.0 (Server setup)
- OS = Windows 2003
- i/p address : 10.1.11.21
- Queue Manager Name : qMngr
- Queue Name (client will put the message) : toServerQ
- Queue Name (client will get the message) : fromServerQ
- I have developed the web application in Tomcat web server 5.5 using MQ base classes for accessing the Websphere MQ.
- Since it is web application there can be atleast 25 request at time.
i.e. when client#1 request data from queue he must get data related to client#1 only not other than client#1.
- For accessing the websphere MQ, I am using websphere MQ base classes in Client mode. (Not JMS)
==>>>> Source Code as follows
Class MQInterface (Servlet) is used for getting the web request from user and reply the response in html format.
public class MQInterface extends HttpServlet {
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
String Output = "";
System.out.println("!! Entered into Banking Servlet !!");
String requestParam = request.getParameter("OPRN_CODE");
if (requestParam.equalsIgnoreCase("GET_NAME_DETAIL")){
     String id = request.getParameter("id");
     Output = MQDataObject().getNameDetail(id);
return Output;
response.setContentType("text/html");
     PrintWriter out = response.getWriter();
out.println(Output);
Class MQDataObject is used for getting and putting data(message) into Websphere MQ.
public class MQDataObject {
private String hostname = "10.1.11.21";
private String channel = "Chnl1";
private String qManager = "qMngr1";
private MQQueueManager qMgr;
private ISISSSLAdaptor ssl;
private ISISConfigHelper ConfigHelper;
private String Output;
public MQDataObject(){
MQEnvironment.hostname = hostname;
MQEnvironment.channel = channel;
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES_CLIENT);
MQEnvironment.sslCipherSuite = "SSL_RER_WERH_3KIUD_EQW_CRT_SSA";
try{
ssl = new DEMOSSLAdaptor("DEMOSSLAdaptor.config");
ConfigHelper = new ISISConfigHelper("MQConnection.config");
}catch(Exception exception){
System.out.println("Exception Details => " + exception);
public String getNameDetail(String sendMessage){
MQEnvironment.properties.put(MQC.TRANSPORT_PROPERTY,MQC.TRANSPORT_MQSERIES_CLIENT);
     String msgText = "";
     try
// Create a connection to the Queue Manager.
qMgr = new MQQueueManager(qManager);
// Set up the options on the queue we wish to open
int openOutOptions = MQC.MQOO_OUTPUT;
// Specify the queue to open and open option      
MQQueue sendingQueue = qMgr.accessQueue("toServerQ",openOutOptions,null,null,null);
// Define the MQ message and write some text in UTF format
MQMessage sendingMessage = new MQMessage();
sendingMessage.writeUTF(sendMessage);
// Specify the message options..
MQPutMessageOptions pmo = new MQPutMessageOptions();
// Put message on the queue
sendingQueue.put(sendingMessage,pmo);      
// Close Sending Queue
sendingQueue.close();          
// Receiving the message back
// Wait for 5 seconds to get reply from receiving queue
Thread.sleep(5000);
// Set up the options on receiving queue we wish to open
int openInOptions = MQC.MQOO_INPUT_AS_Q_DEF | MQC.MQOO_OUTPUT;
MQQueue receivingQueue = qMgr.accessQueue("fromServerQ",openInOptions,null,null,null);
MQMessage receivingMessage = new MQMessage();
// Set and Get the message options
MQGetMessageOptions gmo = new MQGetMessageOptions();
// Receiving the message off the queue.
receivingQueue.get(receivingMessage,gmo);
// Get the message from the receiving queue.
msgText = receivingMessage.readStringOfByteLength(receivingMessage.getMessageLength());
// Close Receiving Queue
receivingQueue.close();
// Close a connection to the Queue Manager.
qMgr.disconnect();
// Parse the received message using parser.
String output = new IFXXMLParser().runExample(msgText);
catch (MQException mqex){
System.out.println("MQ Error : " + mqex);
catch (Exception ex){
System.out.println("General Error : " + ex);
return Output;
The message for sending the receiving is in XML format.
Could any one help me following in questions.
1> Since there is 30 request at time so for improve the performance and resources I need to do connection pooling.
How can I achieve this using base classes.
2> While retrieving (getting) the message for particular request how can I identify the response message.
i.e. when client#1 request data from queue he must get data related to client#1 only not other than client#1.      
because In above scenario there are separate queues for getting the message and putting the message.
I have read the tutorial on connection pulling but I am little confused.
i.e. default connection pool and MQSimpleConnectionManager.
Thanking in Advance
Sanjeev

RahulSharna wrote:
Well my advice would be something different here..
Can you tell us whether the swing application that you are referring could be used by multiple client machines at the sametime ??
If yes my advice for you would be a costly affair yet effective.
Think of seperating your DAO layer from the swing client and you can make an attempt to make a centralized tier where DAO and business services are handled (also ensure that we you use connection pooling with a good tranaction support for building that tier).
Think of publishing those as services either by using remoting tehnologies like RMI,Burlap, Hessian or as a Webservice.
All you'd do is implementing respective client in the swing or client application which you are referring to..
(if you things are too wierd and what is the best solution to go about the below url offers a good solution
[http://tuscany.apache.org/]
And in doing this you'd ensure there is not toomuch load on the Database and you'd have a centralized location where you can start tracing the problem.My guess would be that since the OP said that they have a server that they do in fact have a server.

Similar Messages

  • How to make Connection Pooling in JAVA

    Dear Members
    I want to know that how can i make connection pooling in java and also how can i use that pool in my jsp/servlet application.
    Plz Describe in Detail.
    Thanks
    Vasim

    vasim_saiyad2000 wrote:
    Dear Members
    I want to know that how can i make connection pooling in java and also how can i use that pool in my jsp/servlet application.
    Plz Describe in Detail.
    Thanks
    VasimAs the previous poster is trying to suggest, the server you use will have datasource and connection pooling support. so look up in the manual how to set it up, or do a google search. For example if you use Tomcat, look here:
    http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html

  • Connecting to desktop Java application from R/3

    I want to connect to a java application program in my desktop and return a parameter to R/3. I have installed Java connector and I want to call the java application from R/3 using Java connector.
    I was able to get few samples to setup the RFC destination for a remote server program, but I was not able to find anything for an application in the client system. How to setup the RFC destination for a Java connector to call the application in the desktop? Can anyone please answer this question.

    Hi Allam,
    1. Why do you need to connect from backend system to your desktop client? Did I understood it correctly that it's exacly what you want to do?
    2. I guess examples you saw are for JCO or JCA which is a part of SAP J2EE server. Simply speaking the server is waiting for a client request and your desktop application probably not. If you still are sure that server->desktop connection is what you need then you have to emulate the server on your self and then depending on what you need JCO/JCA you have to create a kind of container that will implement listening service.
    I'd like to hear your answer for question one to give you more detailed answer.

  • Cannot get a connection, pool error Timeout waiting for idle object

    my connection pool setting is
      maxActive="3" minIdle="2"                maxWait="10000"              removeAbandoed="true" logAbandoned="true"         removeAbandonedTimeout="30"         autoreconnection="true" 
    we have 7 people hitting the group of search functions ,
    about 3 minutes I get
    I got error like
    org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot get a connection, pool error Timeout waiting for idle object         at org.apache.tomcat.dbcp.dbcp.PoolingDataSource.getConnection(PoolingDataSource.java:104)         at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)         at Deferment.showResult.checStudent(showResult.java:135)         at Deferment.showResult.doPost(showResult.java:99)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)         at org.apache.catalina.servlets.InvokerServlet.serveRequest(InvokerServlet.java:402)         at org.apache.catalina.servlets.InvokerServlet.doPost(InvokerServlet.java:170)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)         at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    I just wonder
    1) Cannot get a connection, pool error Timeout waiting for idle object-> cause by connection pool leaking or other problem.
    2) Setting the maxactive to -1 ( suggestion from Google) , if I set my connection to ulimit , waht should I put on minIdle="2"
    3) How can I test my connection pool have problem or not ? is
    SHOW PROCESSLIST; tolding me someinformation? I use Mysql
    Thank you!

    I try something like ps2 = conn.prepareStatement(target);
                ps2.setString(1, UNumber); // set input parameter
                rs = ps2.executeQuery();
                sendMail = 0;//how many rows we can find.
                while (rs.next()) {
                    sendMail++;
                ps2.close();
                rs.close();
                conn.close();
      if ((count1 == 0) || (count2 == 0)) {
                    conn.rollback();
                } else {
                    conn.commit();
                    conn.setAutoCommit(true);
                ps.close();
                calstat2.close();
                conn.close();
    calstat = (CallableStatement) conn.prepareCall("{call findStudent}");
                calstat.executeQuery();
                calstat.close();
                conn.close();is that enought? what else I should do to make sure I did close all the connection, after I use it ?
    thank you

  • Developing Java application for windows CE based Handheld device

    Hi everybody,
    I am planning to develop the java application for windows CE
    based handheld device.I came to know that Oracle 9iLite supports
    the Developement of Java Application for windows CE devices.Can
    i use the JDeveloper IDE to develop the application on windows
    NT.If so how to deploy the application on windows CE device(Is
    there any options in Jdeveloper to deploy the application).Any
    body please give the solution.
    Regards,
    Siva mani kumar.D

    I agree. In my opinion Sun has done a horrible job documenting all this madness for the average developer just starting out with this stuff. There is the CLDC, J2ME, Personal Java, J2ME-WTK, MIDP, MIDP-FCS ... maddness. Anyway after sorting through it all for a few days, I think the answer to your question you will need to use Personal Java for WinCE and the Sharp Zaurus, and MIDP for PalmOS for the palm. Jeode seems to be the most common and best Personal Java implementation and it is basically the JDK1.2.2 (or is it 1.1.8) that is designed to run on WinCE and Embeddix (such as Lineo on the Zaurus). You program it just like you would a 1.1.8 application and then you can test it by running pjava.exe which is included in the personal java 3.1 download from Sun. There is also a program called JavaCheck that will ensure that your app will run properly in PersonalJava. As for the Palm, MIDP for PalmOS is a 574K program that installs on your palm device. You then use the J2ME-WTK (wireless toolkit) to build a JAR/JAD file and you use the MIDP API to write the code.

  • Developing Java Applications for Windows CE

    Hello,
    I hope this sub forum is right. So I must develop a Java Application for Windows CE. I read something about J2ME, but I think this is only for Mobilephone and Windows CE supports AWT. So I tried just some simple forms with J2ME.
    Can anybody tell me how I develop java Applications for Windows CE? Can I use Eclipse or must I use another IDE?
    Realy I developed Swing 5-6 Month but I have no idea how I develop Java Applications for Windows CE.
    Thanks a lot for helping...

    The MIDP for Palm OS 1.0 requires Palm OS v3.5 or higher to run. According to your error message, the emulator is not running v3.5 or higher. Try to get hold of a ROM image with a later version. I've run it with v4.0 of the OS and it works.

  • Is there any possibility to develope java application for IPhones

    Is there any possibility to develope java application for IPhones

    921326 wrote:
    Just look to the next thread!I did that after I replied to the last person to ask this question. I spotted this thread:
    Developing iPhone apps with JavaFX 2 (Demo)
    Not much there, but apparently people are trying to hack it together using JavaFX 2 already. I believe I read an article where Oracle itself had given a presentation about a JavaFX2 app on an iPhone; I believe the gist of it is that they want to make it so you can bundle the Java runtime with your application, which makes it legal to sell a Java application through the appstore.

  • Why does Java Application not working with Macromedia Flash 5 or MX?

    Why does Java Application not working with Macromedia Flash 5 or MX?

    Who says they don't?
    Although I don't know much about those I'd think they should be able to talk to Java Aps using Sockets or request Servlets ...
    Spieler

  • Generic Java class for working with Context Nodes

    Hi,all
    I would like to write generic Java class for working with Context Nodes:
    populating node,
    add element to node,
    update node element,
    remove node element
    Any ideas how can I do it?

    Hi,Armin
    Thanks for your answer.
    I have many nodes with the same structure,but different data.
    I don't want to work with each one of them individually.
    This is the main reason.
    Regards,
    Michael
    Any ideas?

  • Our Java application is built with java 1.4 version and oracle 10g

    Our Java application is built with java 1.4 version and oracle 10g version database, is it possible to upgrade oracle database to 11g?

    is it possible to upgrade
    Yes. SE and the other editions have a migration/upgrade utility, not seeing any mention of that program in the XE license docs. To upgrade to 11gR2 from 10g, the 10g instance must be at patch 10.2.0.2 or higher.
    So if you're a GUI dba, might be out of luck. But the the XE install has the catalog upgrade scripts that need to be run, there is a MOS note explaining the manual upgrade steps.
    Or set up a brand new 11g database instance and datapump your user schema(s) from the 10g instance to the new 11g instance. The database doesn't care what java version you're using, it just does what its told with the data. DDL, DCL, DML ... its not much different. Quite a few new features in 11g.
    But if you're after JVMs that piece is not supported with XE.

  • Could not stop SDM server. Cannot execute Java process for stopSDM with parameters 50018

    dear SAP
    i have a system Solman 7.1
    i'm upgrading Solman from SP04 to SP13 using SUM (SP12 patch 10) on windows 2012
    and i faced  error  during  Excution phase 5.6  in JAVA Stack.
    phase : Excution - Actual Update
    Error : An error has occurred during the execution of the Deploy software components step.
    Could not stop SDM server. Cannot execute Java process for stopSDM with parameters 50018. Return code condition success evaluated to false for process java.exe for action ACTION_STOP
    You can find more information in the files D:\usr\sap\SOL\SUM\sdt\log\SUM\DEPLOY-COMPONENTS_22.LOG and ProcessOverview.html.
    To troubleshoot the problem use the provided information. An SAP Note may provide a solution to this problem. Search for SAP Notes with the following keywords:
    SUM??execute??component-deploy-700??deploy-components??com.sap.sdt.j2ee.services.servicesimpl.SDMService??class com.sap.sdt.j2ee.tools.sdmmanagement.OperateSdmException
    i try to restart server and killed sapstartsrv..  but the problem is not solved. 
    please let me know what i check more?
    D:\usr\sap\SOL\SUM\sdt\log\SUM\DEPLOY-COMPONENTS_22.LOG
    <!--LOGHEADER[START]/-->
    <!--HELP[Manual modification of the header may cause parsing problem!]/-->
    <!--LOGGINGVERSION[2.0.7.1006]/-->
    <!--NAME[D:\usr\sap\SOL\SUM\sdt\log\SUM\DEPLOY-COMPONENTS_22.LOG]/-->
    <!--PATTERN[DEPLOY-COMPONENTS_22.LOG]/-->
    <!--FORMATTER[com.sap.tc.logging.TraceFormatter(%d [%6s]: %m)]/-->
    <!--ENCODING[UTF8]/-->
    <!--LOGHEADER[END]/-->
    Apr 19, 2015 3:59:00 AM [Info  ]: Stopping SDM server...
    Apr 19, 2015 3:59:00 AM [Info  ]: AS Java process ID 11 has been started.
    Apr 19, 2015 3:59:00 AM [Info  ]:   Command line: D:\usr\sap\SOL\DVEBMGS00\exe\sapjvm_4\bin\java.exe -Xmx900M -Djava.ext.dir=d:/usr/sap/SOL/DVEBMGS00/SDM/program/lib;D:/usr/sap/SOL/DVEBMGS00/exe/sapjvm_4/jre/lib/ext -cp . -jar d:\usr\sap\SOL\DVEBMGS00\SDM\program\bin\SDM.jar shutdown Sdmguiport=50018 sdmHome=d:/usr/sap/SOL/DVEBMGS00/SDM/program logfile=D:\usr\sap\SOL\SUM\sdt\log\SUM\OperateSDM_60.LOG
    Apr 19, 2015 3:59:00 AM [Info  ]:   Standard out: D:\usr\sap\SOL\SUM\sdt\log\SUM\OPERATESDM_44.OUT
    Apr 19, 2015 3:59:00 AM [Info  ]: Process ID 11 has been started.
    Apr 19, 2015 3:59:00 AM [Info  ]: Waiting for process ID 11, name java.exe to finish.
    Apr 19, 2015 3:59:02 AM [Info  ]: Process ID 11, name java.exe has been finished, exit code 16.
    Apr 19, 2015 3:59:02 AM [Info  ]: Process ID 11, name java.exe has been terminated.
    Apr 19, 2015 3:59:02 AM [Error ]: The following problem has occurred during step execution: com.sap.sdt.j2ee.tools.sdmmanagement.OperateSdmException: Could not stop SDM server.
    Cannot execute Java process for stopSDM with parameters 50018.
    Return code condition success evaluated to false for process java.exe for action ACTION_STOP.
    Best regards..

    Could not stop SDM server. Cannot execute Java process for stopSDM with parameters 50018. Return code condition success evaluated to false for process java.exe for action ACTION_STOP
    Please follow the solution mentioned in the below link.
    Error During Deployment - Java Support Package Manager (OBSOLETE) - SAP Library
    regards,
    pavan

  • Can 10G express be used to create an application for use with a 10G instanc

    Hi
    Can 10G express be used to create an application for use with a 10G instance? I am new to Oracle 10G. I like the interface for creating applications, maintaining users, etc. Can this tool be pointed at a regular instance of 10G so that applications can be created against a regular 10G database not the express database?
    Can PL/SQL proceedures that are created in 10G express also be migrated to a 10G database?
    Thanks in advance
    Dean-O

    Can 10G express be used to create an application for use with a 10G instance?Yeah, that's the whole point from a marketing perspective ;)
    Can this tool be pointed at a regular instance of 10G so that applications can be
    created against a regular 10G database not the express database?Yes but it's a different version. Check out:
    http://www.oracle.com/technology/products/database/application_express/index.html
    Can PL/SQL proceedures that are created in 10G express also be migrated to a 10G database?Yes they can!
    ~Jer

  • Connecting Pooling using Java Servlets

    Hello Friends I am in search of a programme to make a connection pooling using Java Servlets.
    Please let me know where i will get it or do post it.

    If you mean JDBC connection pools, one solution can be found here - http://www.javaexchange.com
    Chuck

  • Any CLDC/MIDP Api for interacting with phone? (eg. phonebook)

    Hello.
    I was going through the APIs for MIDP 1.0, and wasnt able to find any functions which I can use for interacting with the phone stuff. For example, some of the stuff that I would like to do is:
    (1) Add contact info. to the phone book.
    (2) Read the contacts info.
    (3) Set an image as the screen saver / background image
    (4) Set a new ringtone
    (5) Access the Messages Inbox (and also the pictures stored).
    I was hpoing someone could tell me which classes I should be looking at, or whether I am looking at the wrong API set.
    Thanks :)

    see JSR 75: PDA Optional Packages for the J2METM Platform
    if you know your target device you should check the vendor's developer website. many vendors have vendor specific extensions that enable access to PIM functions.

  • Issues while configuring java application using JDO with MS JDBC Driver 1.0

    We are in the process of configuring our java application with the production version of SQL Server 2005 Java Database Connectivity (JDBC) Driver 1.0. We are facing issues getting it to work with Sun App Server using JDO concept.
    After creating the data store, adding the JDBC driver to the application server classpath through console and also copying the driver into the lib directory, we are still getting the below error.
    Following is the stack trace encountered while running the application
    [#|2006-02-15T10:21:25.493+0530|WARNING|sun-appserver-pe8.1_02|javax.enterprise.system.container.ejb.entity.finder|_ThreadID=30;|JDO74010: Bean 'InventoryEJB' method ejbFindAllInventoryItems: problems running JDOQL query.
    com.sun.jdo.api.persistence.support.JDOFatalInternalException: JDO76519: Failed to identify vendor type for the data store.
    NestedException: java.sql.SQLException: Error in allocating a connection. Cause: javax.transaction.SystemException
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.initializeSQLStoreManager(SQLPersistenceManagerFactory.java:870)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getFromPool(SQLPersistenceManagerFactory.java:786)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.SQLPersistenceManagerFactory.getPersistenceManager(SQLPersistenceManagerFactory.java:673)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:849)
         at com.sun.jdo.spi.persistence.support.sqlstore.impl.PersistenceManagerFactoryImpl.getPersistenceManager(PersistenceManagerFactoryImpl.java:681)
         at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.jdoGetPersistenceManager(InventoryEJB1142755294_ConcreteImpl.java:530)
         at com.sun.j2ee.blueprints.supplier.inventory.ejb.InventoryEJB1142755294_ConcreteImpl.ejbFindAllInventoryItems(InventoryEJB1142755294_ConcreteImpl.java:146)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:147)
         at com.sun.ejb.containers.EJBLocalHomeInvocationHandler.invoke(EJBLocalHomeInvocationHandler.java:185)
         at $Proxy164.findAllInventoryItems(Unknown Source)
         at com.sun.j2ee.blueprints.supplier.inventory.web.DisplayInventoryBean.getInventory(Unknown Source)
         at org.apache.jsp.displayinventory_jsp._jspService(displayinventory_jsp.java:119)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:301)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:251)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:723)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:482)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:417)
         at org.apache.catalina.core.ApplicationDispatcher.access$000(ApplicationDispatcher.java:80)
         at org.apache.catalina.core.ApplicationDispatcher$PrivilegedForward.run(ApplicationDispatcher.java:95)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:313)
         at com.sun.j2ee.blueprints.supplier.inventory.web.RcvrRequestProcessor.doPost(Unknown Source)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:767)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:860)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:585)
         at org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249)
         at java.security.AccessController.doPrivileged(Native Method)
         at javax.security.auth.Subject.doAsPrivileged(Subject.java:517)
         at org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282)
         at org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:257)
         at org.apache.catalina.core.ApplicationFilterChain.access$000(ApplicationFilterChain.java:55)
         at org.apache.catalina.core.ApplicationFilterChain$1.run(ApplicationFilterChain.java:161)
         at java.security.AccessController.doPrivileged(Native Method)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:263)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:225)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:173)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:161)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:132)
         at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:551)
         at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:933)
         at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:185)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:653)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.process(ProcessorTask.java:534)
         at com.sun.enterprise.web.connector.grizzly.ProcessorTask.doTask(ProcessorTask.java:403)
         at com.sun.enterprise.web.connector.grizzly.WorkerThread.run(WorkerThread.java:55)
    Can anyone help me on this issue?
    Regards,
    Bindu

    I have already tried this before and this not work too, but strange that even if I use JDBC:ODBC bridge driver, the return value for output parameters are not correct, that is, only return the value that I input but not the value after executed in the procedure....
    The code that I used with JDBC:ODBC bridge is as follow:
    public static void main(String[] args) {
    String url = "jdbc:odbc:;DRIVER=SQL Server;Persist Security Info=False;database=db;Server=sql;uid=sa;pwd=pwd";
              Connection con;
              ResultSet rs = null;
    CallableStatement callS = null;
              try {
                   Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
              } catch(java.lang.ClassNotFoundException e) {
                   System.err.print("ClassNotFoundException: ");
                   System.err.println(e.getMessage());
              try {
                   con=DriverManager.getConnection(url);
    callS = con.prepareCall("{ call dbo.CpJavaTest (?)}");
    callS.registerOutParameter(1, Types.INTEGER);
    callS.execute();
    rs=callS.getResultSet();
    int ret = callS.getInt(1);
    System.out.println("return value : " + ret);
                   while (rs.next()) {
                        String f1 = rs.getString(4);
                        String f2 = rs.getString(5);
                        System.out.println(f1 + " " + f2);
              } catch(SQLException ex) {
                   System.out.println("SQLException: " + ex.getMessage());
    The value of the output parameter is same as what I inputed! Hope any one can teach me how to correct it...
    Thank you very much!

Maybe you are looking for