0 Replies Latest reply on Oct 15, 2001 1:51 AM by Senthil

    Interbase connection pooling!

    Senthil Newbie


      I am new to JAVA, can any one help me.

      I have a EJB class which I deploy in JBOSS with INTERBASE back end.

      Now I establish the connection in the EJB class itself and call a Stored Procedure and convert the Result Set in to XML and receive in the client. There are many method in the EJB class do the same.

      In order to get connection pooling.

      What I have to add to

      Do I need, What I have to add in this file

      What I have to add to

      how I have to use this in my EJB class?

      pl help me sample EJB class code is below

      thanks in advance

      public class AgentEJB implements SessionBean {
      String jdbcURL = "jdbc:interbase://localhost/D:/Sportstech.gdb";
      Connection conn;
      Statement statement;
      ResultSet resultSet;
      ResultSetMetaData resultSetMetaData;
      CallableStatement callableStatement;
      Element output;

      public AgentEJB(){
      conn = DriverManager.getConnection(jdbcURL,"SYSDBA", "masterkey");
      statement = conn.createStatement();
      catch(Exception e){

      public Element getDuplicateAgentCode(Element DuplicateAgentCode) {
      try {
      String astoredProcedure = "select * from SP_CHECKDUPLICATEAGENTCODE(?)";
      callableStatement = conn.prepareCall(astoredProcedure);
      callableStatement.setString(1, DuplicateAgentCode.getAttributeValue("VCAGENTCODE"));
      resultSet = callableStatement.executeQuery();
      catch (SQLException se) {
      return output;

      /** Empty method body
      public void ejbCreate() {}
      /** Empty method body
      public void ejbRemove(){}
      /** Empty method body
      public void ejbActivate() {}

      public void setSessionContext(SessionContext ctx) {}

      public void ejbPassivate() {}