Some doubts in using resource-ref,connection pool n Data-source

Hi all ,
I need little bit clarification in the following points.
1) Does the connection pool which is created can be displayed in JNDI Tree???
I am seeing only DataSOurce in the JNDI Tree Only.
2)In case of Bean Managed Persistance, in ejb-jar.xml,
I had given the following info.
<resource-ref>
         <res-ref-name>ramukkDataSource</res-ref-name>
         <res-type>javax.sql.DataSource</res-type>
         <res-auth>Container</res-auth>
     </resource-ref>Does the <res-ref-name> refers to Datasource Name??
In weblogic-ejb-jar.xml
<reference-descriptor>
       <resource-description>
          <res-ref-name>ramukkDataSource</res-ref-name>
          <jndi-name>ramukkpool</jndi-name>
       </resource-description>
     </reference-descriptor>Here <jndi-name> refers to connection pool as per weblogic bible book.
If so when i deployed my ejb into the server iam getting Datasource cant be found.
If i had given like the following,
In ejb-jar.xml
<resource-ref>
          <res-ref-name>jdbc/ramuJndi</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
     </resource-ref> In weblogic-ejb-jar.xml
     <reference-descriptor>
          <resource-description>
           <res-ref-name>jdbc/ramuJndi</res-ref-name>
           <jndi-name>jdbc/ramuJndi</jndi-name>
       </resource-description>
    </reference-descriptor>Then only my ejb code is successfully deploying doing some work which is as per xpectation.
Can any body tell why I have to give the same name for <res-ref-name> n <jndi-name>??
I am working on this problem from last one week. Still not found the solution.
Connection Pool Creation
GENERAL::
Name : ramukkpool
url : jdbc:mysql://localhost:3306/test
Driver Classname: com.mysql.jdbc.Driver
Properties :
user = root
Password = XXX
create
TARGETS::
i had shifted myServer from left side to right side n clicked >>Apply
(Techncially can we say this as deploying the connection pool into server ???????????
If not how to deploy the connection pool into server??)
I did not get any errors in the console.
Now i am creating a datasource
CONFIGURATION:
Name : ramukkDataSource
JNDIName: jdbc/ramuJndi(Does we have to follow this convention only?? i.e JNDIName should start with jdbc/ only)
PoolName: ramukkpool
create
TARGETS::
I had shifed myServer from left to right n >>Apply.
Now also i did not get any errors in the console.Thanx(in advance),
ramu

I have read the documentation.
I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
oracle.jdbc.pool.OracleConnectionPoolDataSource
I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
My question still remains unanswered, could some kindly help.
Q? I have defined a data source in JDeveloper using
oracle.jdbc.pool.OracleConnectionCacheImpl
In my java bean I am using the code pasted below to make a connection to database.
Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
Any help is highly appreciable.
Thanks in advance.
*******Code to make connection*********
private javax.naming.InitialContext context = null;
private javax.sql.DataSource jdbcURL = null;
private static final String url = "jdbc/ProdCoreDS";
public boolean openConnection()
try
    DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
context = new javax.naming.InitialContext();
jdbcURL = (javax.sql.DataSource)context.lookup(url);
con =  jdbcURL.getConnection();
return true;
  catch(Exception e)
       System.out.println("Error in the Connection  "+e);
    e.printStackTrace();
             return false;
     }}

Similar Messages

  • Creation of connection pools and data sources

    Hi,
    is there a possibility to create jdbc connection pools and data sources not manually, with a script or a mbean?
    That would be helpfull, because at the moment every developper has to do that for himself (because of the individuals generated passwords).
    Thanxs

    The weblogic.management.configuration.JDBCDataSourceMBean
    defines a non-transactional JDBC data source.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCDataSourceMBean.html
    The JDBCConnectionPoolMBean defines a JDBC connection pool.
    http://e-docs.bea.com/wls/docs90/javadocs_mhome/weblogic/management/configuration/JDBCConnectionPoolMBean.html

  • Connection Pooling in Data Source

    Hello,
    I have defined a data source in JDeveloper using
    class :oracle.jdbc.pool.OracleConnectionPoolDataSource
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
      }

    I have read the documentation.
    I changed my class to oracle.jdbc.pool.OracleConnectionCacheImpl from
    oracle.jdbc.pool.OracleConnectionPoolDataSource
    I observed in the EM that the Open JDBC Connections and Total JDBC Connections are the same. When I used oracle.jdbc.pool.OracleConnectionPoolDataSource my Total JDBC Connections was increasing and Open JDBC Connections remains 0.
    My question still remains unanswered, could some kindly help.
    Q? I have defined a data source in JDeveloper using
    oracle.jdbc.pool.OracleConnectionCacheImpl
    In my java bean I am using the code pasted below to make a connection to database.
    Can some one tell whether I am using the correct method of connection pooling mechanism or do I need to make some changes? This application uses JSP and used by lots of people which hits database very frequently.
    Any help is highly appreciable.
    Thanks in advance.
    *******Code to make connection*********
    private javax.naming.InitialContext context = null;
    private javax.sql.DataSource jdbcURL = null;
    private static final String url = "jdbc/ProdCoreDS";
    public boolean openConnection()
    try
        DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
    context = new javax.naming.InitialContext();
    jdbcURL = (javax.sql.DataSource)context.lookup(url);
    con =  jdbcURL.getConnection();
    return true;
      catch(Exception e)
           System.out.println("Error in the Connection  "+e);
        e.printStackTrace();
                 return false;
         }}

  • How to use a JCO connection pool in an EJB?

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

    Hi *,
    I want to build a WebService using SAP Web AS (J2EE Engine) that connects to a R/3 ERP (release 4.7).
    I thought of building a stateless session bean that will be deployed as webservice. The session bean shall connect to the R/3 in order to call some BAPIs. I'd like to use a JCO connection pool. But I'm not sure, where I should create and destroy the connection pool. Are the EJB methods ejbCreate() and ejbRemove() the right ones? If so, my businness methods would just have to get a connection from the pool and call the BAPIs, right? If not, what do you suggest?
    Another question: I already deployed a bean as webservice. Since not really knowing how to use the connection pool, I created a bean with one business method that creates a connection pool whenever it gets called. But if I have to change something in the bean so that I have to redeploy the bean I can't call my business method anymore, because JCO cannot load a native library once again, as it is already loaded, This leads to an exception. So I have to restart the complete engine everytime I redeploy my bean. Are there any workarounds for this problem? I'm not sure whether this is connected to the wrong use of the JCO connection pool.
    Kind regards,
    Lars

  • Which DataSource class to use for DB connection pooling?

    Hi,
    can someone point me in the direction of some (sample?working?) data-sources.xml configurations that pool the DB connections please. I don't have a requirement for TPC, so either native or emulated would be fine, but I need a LOT less db connections for multiple users using stateless sessions on the same database/datasource than I am currently getting. An added bonus would be being able to use the "Monitor Performance" button in Enterprise Manager.
    thanks
    Brigette

    data-sources.xml configurations that pool the DB connections
    Define a data source connection pool with a data-source element in data-sources.xml file.
    <data-source
         class="oracle.jdbc.pool.OracleConnectionPoolDataSource"
              name="OracleDS"
              location="jdbc/OracleDS"
              xa-location="jdbc/xa/OracleXADS"
              ejb-location="jdbc/OracleDS"
              connection-driver="oracle.jdbc.driver.OracleDriver"
              username=""
              password=""
         url="jdbc:oracle:thin:@<host>:<port>:<SID>"
              inactivity-timeout="30"
         />

  • Difference between using app server connection pooling and using the driver

    Hi all,
    How to get connection pooling with out application server and tomcat also?
    What is the difference between using app server connection pooling and using the driver supported connection pooling?
    Regards,
    Murali

    maybe the performance of App server pool is better than the JDBC pool,
    for you don't know wether the implementation of the JDBC interface is good or bad.

  • Using Database Resident Connection Pooling

    Hi all,
    <br><br>
    In trying to use Database Resident Connection Pooling in Oracle 11g, here is what I have done:
    <br><br>
    SQL> conn / as sysdba
    Connected.
    SQL> exec DBMS_CONNECTION_POOL.START_POOL();
    PL/SQL procedure successfully completed.
    SQL> SELECT STATUS,MINSIZE,MAXSIZE,INCRSIZE,SESSION_CACHED_CURSORS,INACTIVITY_TI
    MEOUT
      2  FROM DBA_CPOOL_INFO;
    STATUS              MINSIZE    MAXSIZE   INCRSIZE SESSION_CACHED_CURSORS
    INACTIVITY_TIMEOUT
    ACTIVE                    4         40          2                     20
                   300<br>
    <br>
    In tnsnames.ora file, here is what I have put:<br>
    ORA11G =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = winxp)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = ora11g)
    ORA11GP =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = winxp)(PORT = 1521))
        (CONNECT_DATA =
          (SERVER = POOLED)
          (SERVICE_NAME = ora11g)
      )<br>
    <br>
    Now, in sqlplus in attempt to use DRCP, here is what I got:<br>
    SQL> CONN HR/HR@ORA11G
    Connected.
    SQL> CONN HR/HR@ORA11GP
    ERROR:
    ORA-28547: connection to server failed, probable Oracle Net admin error
    Warning: You are no longer connected to ORACLE.<br>
    <b>Is there anything I missed to properly use DRCP.</b>
    <br>
    Thanks in advance.

    According to Metalink note:
    Subject: Using DRCP and NTS Authentication Results in ORA-28547
    Doc ID: Note:563943.1 Type: PROBLEM
    Last Revision Date: 19-MAY-2008 Status: MODERATED
    this is a bug on Windows and you should configure client sqlnet.ora so that SQLNET.AUTHENTICATION_SERVICES=NONE.

  • Unable to Connect to the Data Source with Report Builder when using a closed Excel file

    I am using Report Builder 3.0 and to get started I am using an Excel spreadsheet as my data source.  I set this up just fine.  I can connect successfully if the file is open Excel.  But if I close the file, I get the error "Unable to
    Connect to the data source".
    This is my connection string:
    Dsn=Licenses;dbq=C:\USERS\AMEADE\DOCUMENTS\licenses.xlsx;defaultdir=C:\USERS\AMEADE\DOCUMENTS;driverid=790;fil=excel 8.0;maxbuffersize=2048;pagetimeout=5
    Works fine if the file is open but stops working when the file is closed.  Any idea what I can do?

    Hi Alice,
    Based on my understanding, when you keep the Excel file open, you can connect to the data source correctly. But when you close the Excel file, the error “Unable to Connect to the data source” is thrown out.
    In your scenario, I would like to know if only this Excel comes across this issue. Have you experienced the same issue when you use other Excel files as a data source? As we tested in our environment, we can connect to the data source whether the Excel file
    is open. You can refer to this
    article to create a data source again then check if you can connect to the data source when the Excel file is closed.
    If issue persists, I would suggest you use the
    Process Monitor to capture the processes during the connection to the data source. Then check the result of each process to find the exact reason.
    If you have any question, please feel free to ask.
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Using WCF Odata service as SSRS data source

    Hi,
    We are evaluating Odata service as data source for SSRS, Idea is to use these reports in sharepoint 2010. I am not sure how to do it.
    Now, I am getting a basic doubt that whether Odata can be used as SSRS data source. Please clarify my doubt. If this is possible please help me with some samples.
    Thanks in advance.
    Santosh

    Hi Santosh,
    Thanks for your post.
    I am not familiar with WCF Odata service, so I would suggest you to refer to the article
    Data Sources Supported by Reporting Services (SSRS),
    to verify whether the predefine data sources could fit your needs, if there is no one available to use for you,
     I would suggest you to implement a custom data processing extensions according to your own needs, you can refer to
    Implementing a Data Processing Extension
    to learn how to implement a data processing extensions.
    Thanks,
    Bill Lu
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • Using ConnBean and CursorBean with a Data Source

    Hi all,
    I',m making a web app. using the Jdev (RUP4) with OA Extension. I looked in the help menu under "About Data-Access JavaBeans and Tags". Here I found the following example, but for some stange reason I cannot get the setProperty to work.
    Example: Using ConnBean and CursorBean with a Data Source This following is a sample JSP page that uses ConnBean with a data source to open a connection, then uses CursorBean to execute a query.
    <%@ page import="java.sql.*, oracle.jsp.dbutil.*" %>
    <jsp:useBean id="cbean" class="oracle.jsp.dbutil.ConnBean" scope="session">
    <jsp:setProperty name="cbean" property="dataSource"
    value="<%=request.getParameter("datasource")%>"/>
    </jsp:useBean>
    <% try {
    cbean.connect();
    String sql="SELECT ename, sal FROM scott.emp ORDER BY ename";
    CursorBean cb = cbean.getCursorBean (CursorBean.PREP_STMT, sql);
    out.println(cb.getResultAsHTMLTable());
    cb.close();
    cbean.close();
    } catch (SQLException e) {
    out.println("<P>" + "There was an error doing the query:");
    out.println("<PRE>" + e + "</PRE>\n<P>"); }
    %>
    Does anyone know how to set the "Property" to a datasource and make it work?
    Best regards,
    MHCI

    There is no point-and-click (Import Data Source Metadata) way to use an LDAP server as a datasource. You have to use the Java Function provided on dev2dev. If you need help with it, please post here.
    - Mike

  • Using SSAS Security Proxy as a Data Source in SSRS

    Hello--
    We have a tabular model that is exposed externally to our clients via msmdpump.dll  (Configure
    HTTP Access to Analysis Services on Internet Information Services (IIS) 7.0).  
    We have also created a proxy to use custom security accessing the cube.  This proxy works fantastic from Excel.  The proxy URL looks like this:
    https://xxxxx.xxxxx.com/login
    However, from Reporting Services, using the URL to the security proxy as the server name, I cannot make a connection. I ran a profiler trace on the server and I see a connection trying to be made to get the database names, but it returns an error that says:
    "DataSourceInfo property cannot be overwritten."
    I've searched and searched online and found nothing so I'm turning to this forum to see if I can get some help here.
    To summarize, the proxy works great from Excel, but does not work from SSRS. It attempts to connect and get the database names, but returns an error.
    Any help would be greatly appreciated!!

    Hi AshleyPaceNC,
    According to your description, you have configured Http access to SSAS, and you also created a custom security for when connecting the cube. Now you find when applying the custom login URL in Excel, it can work. However, In SSDT, this URL is not working.
    Right?
    In this scenario, I want to know the connection string you use in Excel. You can click Connections->Properties->Definition to see the Connection String.
    Based on my research, it seems the internal working of Excel external data source connection is either a ODBC or OLEDB type connection. It can access with credentials via some hops redirect. However, in SQL Server Data Tool, our BI services directly
    open connection to the data source (database, file....), so it can't have a URL redirect before getting the destination database.
    Best Regards,
    Simon Hou
    TechNet Community Support

  • Crystal Report using a Web Service as a data source?

    I am trying to figure out how to use a Web Service as a data source in Crystal Reports. When I use the report wizard, I do not see an option to select Web Service as a new connection. We are currently using Crystal Reports 2008 v12.1.0.892. Could it be that my version does not support this? Is there an update that contains this feature? Please help.

    Thanks for your response. Unfortunately I do not see a radio button for Web Services. I've read that it should be there too. Could it be a missing plug-in or patch?
    Here are screen shots of what I see when trying to connect to an XML. Any thoughts?
    [http://s26.photobucket.com/albums/c120/hpolit/?action=view&current=wizard1.jpg]
    [http://s26.photobucket.com/albums/c120/hpolit/?action=view&current=wizard2.jpg]

  • How to connect to different data sources in  XI 3.1 UNIVERSE?

    hi experts,
    We are going to migrate from BO 6.5 to  BO XI3.1.
    and we have different data sources to extract and generate the reports using various tools like Webi,Crystal Reports, Deski etc.
    1         How to connect to different data sources like SAP BI query, DB2, Oracle etc,, provide me the step by step solution.
    2     We need to migrate the universes and reports from BO 6.5 to BO XI 3.1 using the Report Conversion Tool.
    can we directly convert from the deski reports to Webi or do we need to migrate first through Import Wizard?
    3    Scheduling the Reports through Infoview
    4    Various issues and how to resolve those issues, we generally face while scheduling, and while creating the queries like for example time out errors etc..
    5    BO Security
    6    Universe creation with best practices and the loops,contexts,aliases etc..
    please provide me the step by step solution documents and links.
    thans in advance
    venuscm

    I would recommend to take a look at the official documentation. YOu can find this here
    http://help.sap.com
    NAvugate to SAP BusinessObjects->All products and the select the product you want eg. BusinessObjects ENterprise or Universe designer and the appropriate version XI 3.1. Take a look at the admin and the user guides.
    Currently the Data FEderator will allow you to buid a universe that access data from various data sources. Another option is to merge queries from different universes at report level.
    Regards,
    Stratos

  • Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'

    When opening a form in SharePoint 12013 that was created from Infopath 2013, I get the following error.
    You do not have permissions to access a database that contains data required for this form to function correctly.
    An entry has been added to the Windows event log of the server.
    Log ID:5566
    When I go to the log files on the SharePoint server. I see the following error.
    Exception Message: The form cannot connect to the data source. Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'
    I am guessing this has something to do with the UDCX connection and the database.
    Can anyone help me get this fixed?

    Hi Jim,
    Please check the following kb article when it occurs 5566errro with the UDCX conection file, try the method of using the Secure Store Service to store alternate credentials for the data connection method, or the method of stating the credentials
    in the UDC file explicitly.
    Also check if it could help with setting sql server as "SQL Server and Windows Authentication mode".
    http://support.microsoft.com/kb/981684
    Thanks
    Daniel Yang
    TechNet Community Support

  • Not able to connect to Oracle Data source in Oracle Essbase Studio 11.1.2.2

    Hi,
    When i tried to connect to Oracle data source, i get this error "Unable to establigh connection. Ensure that the server is running, the user name and password are correct, and the ohter data fields match the server's configuration" when i tried to select database.
    If i change server name from to localhost, it allows to select database and does not give any error. but clicking on next button says localhost is not accepted, it needs machine name. Then how to connect to Oracle Data source?
    Edited by: User006 on Oct 10, 2012 12:45 PM

    It is possible the Oracle db has not been installed correctly, I take this is a personal install on a laptop, if so did you install the loopback adaptor.
    Have you tried the connection using the ip of the machine.
    Cheers
    John
    http://john-goodwin.blogspot.com/

Maybe you are looking for

  • Time Machine can no longer find backup disk

    I have a USB drive hooked up to my airport extreme that I used to use as a TimeMachine backup for my MacBook Pro. I use another external drive to back up my iMac, but it is connected to the iMac directly. The drive on the airport extreme used to back

  • White widget text no longer white

    I'm experiencing a weird problem with my widgets. Anywhere that white text should appear, it now appears black with a faint outline where the normally white text is antialiased against the darker background color. This affects all the widgets with wh

  • Foreign currency validation

    Hi, Experts, I was wondering when doing Foreign currency validation,  The system get the Profit center defaultly, when posting the variance. I am wondering where did system get the Profit center when we do FAGL_FC_VAL?

  • Export to xml error

    hi, I am getting the following error while exporting to xml please can neone help thanks in advance      ORA-06502: PL/SQL: numeric or value error: character to number conversion error

  • How to restore original messaging client

    I have installed Nokia Messaging on my 5800XM and found out that it absolutely useless. Before I have succesefully used "Messaging" to access my email via IMAP. However it is not possible anymore to set up IMAP account. If I try to set up a mailbox t