How to use JNDI datasource instead of database connection settings JDev 10g

Hi,
In order to use the different database from other environments, we are not able to use the JNDI datasource configuration settings, all the time need to configure the database connection settings from JDeveloper by changing the database connectivity settings in the JDeveloper for each environment separately, need a solution on how to make the database connectivity unique using the JNDI datasource name for all the environments for database connectivity settings through the application server console rather than changing the database adapter configuration in JDeveloper.
Please provide the update at the earliest. Your help is greatly appreciated. Thanks in advance..

What are you not clear on?
What you need to do is get your developers to conform to a database naming standard, as stated above, so if you have an oracle database that is for eBusiness Suite you get all developers to create a DB connection in JDev called, ora_esb as an example.
When the developer creates a DB adapter this will create a JNDI name of eis/DB/ora_ebs. When the BPEL project is deployed it looks for the JNDI name in the oc4j-ra.xml file to see its connection details. If they don't exist then they use the developers connection details. The issue with this is that they generally always point to the development DB. It is best practice for the developers to remove the mcf settings in the DB adapter WSDL. This way if the JNDI name has not been configured it will fail.
So when you migrate from dev-test-prod what you have is the JNDI name eis/DB/ora_ebs. The dev points to the dev instance of ebs, test points to the test instance and so on. This means that you don't need to adjust any code in the BPEL projects.
cheers
James

Similar Messages

  • How to use jndi datasource on Weblogic instead of adding a DB data source

    Hi All,
    version: 11.1.1.4
    I am trying to figure out how in my ADF applications I can use an existing jndi datasource out on our weblogic servers instead of having to bury the Database db source in my adf applications. Like SOA I would like to reference the DB directly during design so I can pull in entities and build view objects, but when I deploy I want it to reference the jndi datasource out on the weblogic server.
    Is this possible? If so I am not sure how to configure it like I would a DB adapter in SOA.
    As always appreciate the info.
    Thanks,
    S

    If you use ADF in the model layer (application modules) you can configure them to use JNDI Datasources. Just right click on the application module and select 'Configurations...'. In the next dialog you see all the configurations currently available (one named xxxxxlocal and one named xxxxxshared at least). Select the local and hit the edit button. This open the DB connect dialog where you can change the connection from JDBC URL to JDBC Datasource (JNDI). Save your work and when you now start the app it will use the JNDI name.
    Timo

  • How can I configure ang use JNDI datasource on Tomcat 4.0.x ?

    How can I configure ang use JNDI datasource on Tomcat 4.0.x ?
    Please help me , Thanks !

    Hello ,
    You need to go through the JNDI tutorial which you can access at the sun's site. It will explain all the things you need.
    By the way all you want to use JNDI datasource is JNDI class library and some naming or directory service provider, which also you can download from sun.
    Good Luck.

  • Deployment using JDBC DataSource instead of JDBC URL

    Hello,
    I've noticed some strange behaviour when deploying an ADF application (11g, latest release) to a WLS (integrated or stand-alone), when using JDBC DataSource as a connection type for the application module.
    Normally, when you create your Business Components, a Database Connection is added to the Application Resources panel, eg MyConnection. If you then set your AM to JDBC DataSource instead of JDBC URL, the default datasource would be jdbc/MyConnectionDS. To make the application use the DataSource defined on the WLS, I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.
    So far so good: after deployment to the WLS, the application uses the DataSource defined on the WLS server (jdbc/MyConnectionDS). When changing it on the server to another database, the application indeed uses this other database. Also, the following is automatically added to the web.xml during deployment to .ear file:
      <resource-ref>
        <res-ref-name>jdbc/MyConnectionDS</res-ref-name>
        <res-type>javax.sql.DataSource</res-type>
        <res-auth>Container</res-auth>
      </resource-ref>Now the part that doens't make sense to me: if I delete the password in the Database Connection under Application Resources, I can still deploy the application, but the jdbc/MyConnectionDS on the WLS is not found anymore. While it is still there. I get the following error message:
    Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    oracle.jbo.DMLException: JBO-27200: JNDI failure. Unable to lookup Data Source at context java:comp/env/jdbc/MyConnectionDS
    I made the JDev connection (used at development) invalid, and the deployed application stops working (at runtime). While it should just be using the JDBC DataSource defined on the WLS, that is still there. The reason appears to be that when there is no password in the Database Connection in JDev, the entry in the web.xml (see above) is not made during deployment.
    I am doing something wrong? Or is this "expected" behaviour?
    The reason why it bothers me: I have made a reusable component (a Data Control, let's call it A) from a model project, by deploying it to a ADF library JAR. I've set the AM of this project to use a certain jdbc datasource, which will be defined on the WLS.
    When importing the library JAR of A inside another application (B), the connection of the A is added to B. But ofcourse, without the password for security reasons, so we're in the situation described above: When I deploy the new application B, the web.xml is not updated with the DataSource of A, and the application doens't work. And what I would like to avoid, is that whenever someone uses component A, that they have to update the connection details of component A in application B. Because when I fill in the password of application A's Database Connection in application B, all works well again.
    I hope this question makes sense. :-)
    Thanks in advance,
    Chris

    Arun and Krithika,
    Thanks for your replies. I have already done what both of you suggested:
    Chris Schryvers wrote:
    I then uncheck "Auto Generate and Synchronize weblogic-jdbc.xml Descriptors during deployment" in the Application Properties > Deployment tab.I can get it to work, both for deployment on the internal WLS as on a stand-alone WLS.
    My only question is: why does a property at development time (the empty password of the JDev connection) influence the runtime behaviour (the JDBC DataSource not being found after deployment).
    Ofcourse, setting the password for the connection in JDev "solves" the problem. But I want to avoid that everyone who uses the reusable component needs to fill in the password for its database connection. In my opinion, that's the whole point of using a JDBC datasource instead of a JDBC URL: the reusable component just states that there needs to be a jdbc/MyConnectionDS on the server and it can be used as is. Wihtout any modifications at development time.
    What's more:
    Suppose I import the reusable JAR and its connection is added to JDev, without password.
    *) Leaving the password empty: DS not found after deployment (web.xml not adjusted, as mentioned in my original post)
    *) Entering the correct password: DS found, web.xml adjusted at deploy time.
    *) Entering an incorrect password: DS found, web.xml adjusted at deploy time.
    It even works when I enter an incorrect password, which proves that the JDBC DataSource on the server is used, instead of the JDev connection. Then why is the web.xml not adjusted when the password remains empty?
    Arun, I'll check the documention that you linked to, but this just seems like an weird decision in the implementation of JDev/ADF. :-)

  • How to use Native XA in XE database?

    Hi,
    I am having problem in using XA datasource in XE. I understand if we are using XE database, jvm is not available. Thus, we have to use Native XA which requires using JDBC Thin Driver.
    My JBoss hit below error during initialization.....
    =====================================
    2006-03-28 16:14:27,645 INFO [org.jboss.system.server.Server] JBoss (MX MicroKernel) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 1m:18s:482ms
    2006-03-28 16:16:05,887 WARN [org.jboss.tm.TransactionImpl] XAException: tx=TransactionImpl:XidImpl [FormatId=257, GlobalId=snz-dcs-001//51, BranchQual=] errorCode=XAER_RMERR
    oracle.jdbc.xa.OracleXAException
         at oracle.jdbc.xa.OracleXAResource.checkError(OracleXAResource.java:1157)
         at oracle.jdbc.xa.client.OracleXAResource.start(OracleXAResource.java:295)
         at org.jboss.resource.adapter.jdbc.xa.XAManagedConnection.start(XAManagedConnection.java:143)
         at org.jboss.tm.TransactionImpl.startResource(TransactionImpl.java:1148)
         at org.jboss.tm.TransactionImpl.enlistResource(TransactionImpl.java:636)
         at org.jboss.resource.connectionmanager.TxConnectionManager$TxConnectionEventListener.enlist(TxConnectionManager.java:455)
         at org.jboss.resource.connectionmanager.TxConnectionManager.managedConnectionReconnected(TxConnectionManager.java:343)
         at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionManager2.java:483)
         at
    Can anyone help to enlighten?
    Or maybe provides me with basic configuration of using XA datasource in XE database so I can check whether my config is correct or not?
    Any help will be appreciated!
    Thanks before.
    Joel

    Hi,
    Here's an update regarding my problem with XA transaction using XE.
    I don't know exactly how, but it works now.
    Here are the steps I did :
    ===================
    1. I decided to try creating JAVA_XA package in XE database. I took the script
    from oracle enterprise edition.
    This package can't be compiled in XE Production version, but it can be compiled
    in XE beta version.
    2. After using compiling, the JBoss initialization was still failing.
    3. Backup the database (with JAVA_XA) , and upgraded the beta-version to
    Production version.
    4. Restore the database (with JAVA_XA) into the Production version.
    5. it works :))
    Hopefully I can get some inputs/comments from the experts here in the forum.
    Thanks for those who has responded to my previous posts.
    Regards,
    Yoel
    Good job! A nice extra mile.

  • How to use taglibs in JSP for Database access

    Hi
    Could any one please tell me how to use taglibs in JSP for Database access
    with regrds
    Jojo

    This is a sample how to connect to a MySQL database with JSTL 1.0:
    <%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
    <%@ taglib uri="http://java.sun.com/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>JSTL MySQL</title>
    <link href="styles.css" rel="stylesheet" type="text/css" />
    </head>
    <body>
    <c:catch var="e">
    <sql:setDataSource var="datasource" url="jdbc:mysql://Your_Server_Name_Here/You_Schema_Here"
                           user="Your_Username_Here" password="Your_Password_Here"
                           driver="com.mysql.jdbc.Driver"/>
    <c:out value="datasource= ${datasource},  Class = ${driver.class}"/>
    <br />
    <br />
    <sql:query var="deejays" dataSource="${datasource}">SELECT * FROM Your_Table_Name_Here</sql:query>
    <table>
    <%-- Get the column names for the header of the table --%>
    <c:forEach var="columnName" items="${deejays.columnNames}"><th><c:out value="${columnName}"/></th></c:forEach>
    <tbody>
    <%-- Get the value of each column while iterating over rows --%>
    <c:forEach var="row" items="${deejays.rows}">
      <tr><c:forEach var="column" items="${row}">
            <td><c:out value="${column.value}"/></td>
          </c:forEach>
      </tr>
    </c:forEach>
    </tbody>
    </table>
    </c:catch>
    <br />
    <br />
    <c:if test="${e!=null}"><span class="error">Error</span>�
      <c:out value="${e}" />
    </c:if>
    </body>
    </html>And this thread might help you:
    http://forum.java.sun.com/thread.jspa?threadID=639471&tstart=44

  • If you're trying use your hotspot and connected to wifi on your iphone, does the wifi stop working and start using your data instead of staying connected to the wifi?

    If you're trying use your hotspot and connected to wifi on your iphone, does the wifi stop working and start using your data instead of staying connected to the wifi?

    Spencer Simmonds wrote:
    Thanks for the quick response. What you have said makes sense but there is no rhyme or reason to he data used. I reset my cellular data counter to zero so both sent and received read zero. I was connected to wifi and let the phone to go into sleep mode. I waited about ten minutes and sent myself the same email four times, each with a 750 kb attachment. It was sent to my .me address so it was push mail on my phone. Sure enough I checked a minute later while bringing the phone out of sleep mode and checked the data. It showed just 10kb sent but 1mb received which just doesn't tally with the 4 x 750kb mails received. It just isn't making sense.
    He knows what you asked and has already answered it!
    I thought I had read where the iOS4 (or maybe just the iPhone 4) was supposed to be able to keep wifi connections alive while inactive. If the phone is sitting there on a charger with a wifi connection available, why use the 3G?

  • How to resolve the datasource with Cloudspace database?

    Hi,
    I am running WebLogic 6.1 on Win2k and I have problem with
    Cloudscape database in Default Admin Server.
    === Start init method in myJDBCReadServlet.java ===
    Init Error: javax.naming.NameNotFoundException:
    Unable to resolve MyJDBCDataSource.
    Resolved: '' Unresolved:'MyJDBCDataSource' ; remaining name ''
    === Finish init method in myJDBCReadServlet.java ===
    1. I created simple table in the Cloudscape database using IJ utility and inserted
    some values:
    prompt>java -classpath %CLASSPATH%;..\lib\tools.jar COM.cloudscape.tools.ij
    ij version 3.5 (c) 1997-2000 Informix Software, Inc.
    ij> CONNECT 'jdbc:cloudscape:demo;create=true';
    WARNING 01J01: Database 'demo' not created, connection made to existing database
    instead.
    ij> SHOW CONNECTIONS;
    CONNECTION0* - jdbc:cloudscape:demo;create=true
    * = current connection
    ij> CREATE TABLE employee(name CHAR(25), location CHAR(20), id INTEGER);
    0 rows inserted/updated/deleted
    2. I created Connection Pool and Data Source using Default Console
    The Connection Pool configuration is the following:
    Name : MyJDBC Connection Pool
    URL : jdbc:cloudscape:demo
    Driver Classname: COM.cloudscape.core.JDBCDriver
    Properties : user=none password=none server=none
    My Data Source configuration is the following:
    Name : MyJDBC Data Source
    JNDI Name: MyJDBCDataSource
    Pool Name: MyJDBC Connection Pool
    I added the following line to myserver startup script to point
    to the database location:
    -Dcloudscape.system.home=./samples/eval/cloudscape/data
    3. I wrote the servlet and here is the piece of the myJDBCReadServlet
    code which generated the exception:
    public void init()
    System.out.println("=== Start init method in myJDBCReadServlet.java ===");
    try {
    ctx = new InitialContext();
    ds = (javax.sql.DataSource) ctx.lookup ("MyJDBCDataSource");
    } catch (Exception E) {
    System.out.println("Init Error: " + E);
    System.out.println("=== Finish init method in myJDBCReadServlet.java ===");
    Why it cannot find the database using JNDI name?
    Any help will be greatly appreciated,
    Jacob Nikom

    Great.
    Here is a link where you can find more cloudscape details:
    http://www.cloudscape.com/docs/doc_36/doc/html/coredocs/docs2.htm
    S.
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    >
    Problem solved!
    Slava - thank you for your help.
    Yes, cloudscape.jar file should be on the CLASSPATH.
    I also put tools.jar from the same directory (I am not sure
    is it necessary or not, but I did not test it).
    However,it is not enough to run WebLogic with Cloudscape
    successfuly. You have to tell WebLogic where the database
    files are. To do it you have to include start-up option
    in the startWebLogic.cmd file.
    It looks like:
    -Dcloudscape.system.home="C:~\samples\eval\cloudscape\data"
    After that it runs. Actually, the file cloudscape.html in the
    directory ~\samples\eval\cloudscape has quite a bit of information.
    Unfortunately, it is difficult to comprehend it until you understand whatthe
    problem is.
    Regards,
    Jacob
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jacob,
    You need to specify the Cloudscape classes in your
    CLASSPATH, which exists in weblogic/samples/eval/cloudscape/lib.
    Regards,
    Slava Imeshev
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    This is the source of the error:
    <Error> <JDBC>
    <Cannot startup connection pool "MyJDBC_Connection_Pool"
    Cannot load driver class: COM.cloudscape.core.JDBCDriver>
    but I don't know how to fix it.
    I don't know the name of the Cloudscape JDBC driver.
    I looked at cloudscape.jar file and found the following class file:
    COM/cloudscape/core/JDBCDriver.class
    Is it the right driver?
    I tried to use COM.cloudscape.core.XADataSource driver
    classname, but got the same problem - WebLogic cannot find it.
    Which .jar file has correct Cloudscape JDBC driver?
    What else should I do to ensure that driver loads properly?
    Thank you,
    Jacob Nikom
    "Slava Imeshev" <[email protected]> wrote:
    Ok. I don't see that neither connection pool nor data source
    trying to start. You did not added targets to them or may be
    you provided wrong target.
    S.
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    Thank you for your response. I am sending you the full
    log as .txt file attachment. It is not very large in order
    to zip it.
    I added some Cloudscape parameters to the startup script,
    so you can see them there. They show to the WebLogic where
    the database is located.
    Also, I think the database was running because I could see
    my tables using IJ utility (Cloudscape tool), however I am
    not sure how Cloudscape exactly starts and runs.
    Regards,
    Jacob Nikom
    "Slava Imeshev" <[email protected]> wrote:
    Could you zip the whole log and send it to me?
    I just want to see what the console says about
    creation of your datasources and pools.
    Regards,
    Slava Imeshev
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    This is the output with Stdout severity threshold = "info".
    I only split a couple of very long lines.
    <Oct 2, 2001 6:29:33 PM EDT> <Info> <HTTP>
    <[WebAppServletContext(5891807,myJDBCReadServlet,/myJDBCReadServlet)]
    myJDBCReadServlet:
    init>
    === Start init method in myJDBCReadServlet.java ===
    Init Error: javax.naming.NameNotFoundException: Unable to resolveMyJDBC_Data_Source.
    Resolved: '' Unresolved:'MyJDBC_Data_Source' ; remaining name
    === Finish init method in myJDBCReadServlet.java ===
    === Start service method in myJDBCReadServlet.java ===
    Service Error: java.lang.NullPointerException
    === Finish service method in myJDBCReadServlet.java ===
    "jacob nikom" <[email protected]> wrote:
    Hi Slava,
    Thank you very much for your response.
    I followed your advice and changed the names
    of my ConnectionPool and DataSource, removing
    all spaces. Now they are MyJDBC_Data_Source and
    MyJDBC_Connection_Pool (is underscore OK?).
    I think I turned on the message level on "info" few days ago.
    Could you remind me how to check it?
    I am sending you the full log of my session starting
    from the beginning up to the crush:
    prompt>"C:\WebLogic61\jdk131\bin\java" -hotspot -ms64m -mx64m
    -classpath
    .;.\lib\weblogic_sp.jar;.\lib\weblogic.jar;.\lib\cos.jar
    -Dweblogic.Domain=mydomain -Dweblogic.Name=myserver
    "-Dbea.home=C:\WebLogic61"
    -Dcloudscape.system.home="C:\WebLogic61\wlserver6.1\samples\eval\cloudsc
    a
    p
    e
    \data"
    >
    -Dweblogic.management.password= -Dweblogic.ProductionModeEnabled=false
    >
    "-Djava.security.policy==C:\WebLogic61\wlserver6.1/lib/weblogic.policy"
    weblogic.Server
    <Oct 2, 2001 5:21:57 PM EDT> <Info> <Security> <Getting bootpassword
    from user.>
    Enter password to boot WebLogic server:
    Starting WebLogic Server ....
    <Oct 2, 2001 5:22:02 PM EDT> <Notice> <Management> <Loadingconfiguration
    file
    .\config\mydomain\config.xml ...>
    <Oct 2, 2001 5:22:07 PM EDT> <Notice> <WebLogicServer> <StartingWebLogic
    Admin
    Server "myserver" for domain "mydomain">
    <Oct 2, 2001 5:22:10 PM EDT> <Notice> <Management> <Starting
    discovery
    of Managed
    Server...
    This feature is on by default, you may turn this off bypassing -Dweblogic.management.discover=false>
    <Oct 2, 2001 5:22:17 PM EDT> <Notice> <Management> <Application
    Poller
    started
    for development server.>
    <Oct 2, 2001 5:22:17 PM EDT> <Notice> <WebLogicServer><SSLListenThread
    listening
    on port 7002>
    <Oct 2, 2001 5:22:17 PM EDT> <Notice> <WebLogicServer>
    <ListenThread
    listening
    on port 7001>
    <Oct 2, 2001 5:22:18 PM EDT> <Notice> <WebLogicServer> <StartedWebLogic
    Admin
    Server "myserver" for
    domain "mydomain" running in Development Mode>
    === Start init method in myJDBCReadServlet.java ===
    Init Error: javax.naming.NameNotFoundException: Unable to
    resolve
    MyJDBC_Data_Source.
    Resolved: '' Unresolved:'MyJDBC_Data_Source' ; remaining name
    === Finish init method in myJDBCReadServlet.java ===
    === Start service method in myJDBCReadServlet.java ===
    Service Error: java.lang.NullPointerException
    "Slava Imeshev" <[email protected]> wrote:
    Jacob,
    Just FYI, DataSource or ConnectionPool name can not
    contain spaces. Change the names and let me know if it helps.
    Regards,
    Slava Imeshev
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    Hi Slava,
    Thank you for your message. I did assign target to
    my Connection Pool and Data Source. It is "myserver".
    Also, there is not any error messages form WebLogic
    shell except the ones which I place in my message.
    So far the misery remains unresolved.
    Regards,
    Jacob Nikom
    "Slava Imeshev" <[email protected]> wrote:
    Hi Jacob,
    Make sure you assigned targets to the connection pool and
    data
    source.
    Also
    check Weblogic shell console for errors.
    Regards,
    Slava Imeshev
    "jacob nikom" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I am running WebLogic 6.1 on Win2k and I have problem
    with
    Cloudscape database in Default Admin Server.
    === Start init method in myJDBCReadServlet.java ===
    Init Error: javax.naming.NameNotFoundException:
    Unable to resolve MyJDBCDataSource.
    Resolved: '' Unresolved:'MyJDBCDataSource' ; remainingname
    === Finish init method in myJDBCReadServlet.java ===
    1. I created simple table in the Cloudscape database using
    IJ
    utility
    and
    inserted
    some values:
    prompt>java -classpath %CLASSPATH%;..\lib\tools.jarCOM.cloudscape.tools.ij
    ij version 3.5 (c) 1997-2000 Informix Software, Inc.
    ij> CONNECT 'jdbc:cloudscape:demo;create=true';
    WARNING 01J01: Database 'demo' not created, connection
    made
    to
    existing
    database
    instead.
    ij> SHOW CONNECTIONS;
    CONNECTION0* - jdbc:cloudscape:demo;create=true
    * = current connection
    ij> CREATE TABLE employee(name CHAR(25), location
    CHAR(20),
    id
    INTEGER);
    0 rows inserted/updated/deleted
    2. I created Connection Pool and Data Source using Default
    Console
    The Connection Pool configuration is the following:
    Name : MyJDBC Connection Pool
    URL : jdbc:cloudscape:demo
    Driver Classname: COM.cloudscape.core.JDBCDriver
    Properties : user=none password=none server=none
    My Data Source configuration is the following:
    Name : MyJDBC Data Source
    JNDI Name: MyJDBCDataSource
    Pool Name: MyJDBC Connection Pool
    I added the following line to myserver startup script
    to
    point
    to the database location:
    -Dcloudscape.system.home=./samples/eval/cloudscape/data
    3. I wrote the servlet and here is the piece of themyJDBCReadServlet
    code which generated the exception:
    public void init()
    System.out.println("=== Start init method inmyJDBCReadServlet.java
    ===");
    try {
    ctx = new InitialContext();
    ds = (javax.sql.DataSource) ctx.lookup
    ("MyJDBCDataSource");
    } catch (Exception E) {
    System.out.println("Init Error: " + E);
    System.out.println("=== Finish init method inmyJDBCReadServlet.java
    ===");
    Why it cannot find the database using JNDI name?
    Any help will be greatly appreciated,
    Jacob Nikom

  • How to use JNDI in an eWay?

    Currently this project is using an Oracle eWay for database communication. However, it is necessary to specify the database URL, user, and password. This is fine as long as these properties won't change, but they are different in each environment (dev, qa, uat, and production). We could create different eDesigner environments, and different deploymnet profiles. But we would prefer to have a single deployment profile so we could then generate a single ear file using the commandline codegen tool. That single ear file will then be promoted through the various stages.
    For this to work, we would like to specify a JNDI datasource, rather than the actual database connectivity properties. Is this possible? If not, is there a different eway (JNDI datasource eWay?) that provides this capability?

    Sorry for the late response,
    InitialContext ctxt = new InitialContext();
    DataSource ds = (DataSource) ctxt.lookup( "jdbc/DB2Test" );
    This is how i'm using the connection pool in my code. I set up a JDBC connection resource/pool, make sure it tests fine, and then I use it in my code above.
    The only reason I'm doing this is because I am passing the datasource to a jar.
    If you are using an eway to connect to the database, I would suggest using iConfigure. You can overwrite connection parameters without compiling a new EAR file. It's a more 'JCAPS' solution versus a 'Java' solution.
    --Adam                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How create a jndi / datasource for MySQL?

    Hi. This is CarloSilva, from Brazil, again. This time for help to datasource. My application uses MySQL database and ADF components. Please, would can anybody tell me step to step how to create a jndi conection datasource?
    I need setup project for uses datasource, no jdbc connection. How to?
    I need setup web.xml. How?
    I need setup a datasource in JDeveloper for my application. How?
    Please, sorry this questions but I new in JDeveloper and need use it for learn.
    Thanks.

    A JDBC connection may be used as a JNDI resource.
    If the Connections-Navigator connection is DBConnection1, the corresponding datasource is jdbc/DBConnection1DS.
    1. Create a JSP page.
    2. In the web.xml of the JSP add
    <resource-ref>
    <res-ref-name>jdbc/DBConnection1DS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    3. In the JSP page obtain a connection with the datasource.
    InitialContext initialContext = new InitialContext();
    javax.sql.DataSource ds = (javax.sql.DataSource)initialContext.lookup("java:comp/env/jdbc/DBConnection1DS");
    java.sql.Connection conn = ds.getConnection();

  • How to use JNDI lookup

    Hi ,
    I am creating a POC for my project.Its using ATG and spring frameworks using RAD 6.first I have created ATG sample project in that same EAR file i created sample Spring project.Both are running in the same EAR.
    I want to use spring classes from ATG components to use those methods.that is i should pass parameters to spring project methods and i should get the return value after executing those methods.
    I heard that using JNDI look up I can get spring project class objects using that I can invoke spring project methods.
    My requirement is two projects will be running in the same EAR.But one project will not be having information about other projects.both are independent from other.Using JNDI look up i need to invoke Spring project methods.
    Please anyone help me how to do this.
    I used java:comp/env/com/dao/EmpDAO to get instance of my class EmpDAO.But i am getting naming exception.Can anyone help me how to do this
    Thanks in advance.

    If Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    MOD

  • How to use JNDI lookup from a JSP

    Hello,
    I know I should not be doing this (writing the lookup code in a JSP) but have to do it for some reasons.
    I am using this code in my JSP:
    try
         Context ctx = new InitialContext();
         dataSource = (DataSource)ctx.lookup("jdbc/mybillingora");
         conn = dataSource.getConnection();
         statement = conn.createStatement();
    catch(Exception excep)
    Is this code enough for a JNDI look up?? When I use this code, I get an exception:
    "javax.naming.NameNotFound exception:jdbc/mybillingora"
    Do I need to do something else??
    Why do we use :
    Properties env = new Properties();
    env.put(Context.INITIAL_CONTEXT_FACTORY,
    "<some_context_factory>");
    env.put(Context.PROVIDER_URL, PROVIDER_URL);
    env.put(Context.SECURITY_PRINCIPAL, JNDI_USER);
    env.put(Context.SECURITY_CREDENTIALS, JNDI_PWD);
    InitialContext = new InitialDirContext(env);
    where JNDI_USER is the userid If ACL is configured at the JNDI server
    where JNDI_PWD is the password If ACL is configured at the JNDI server
    Context.INITIAL_CONTEXT_FACTORY is the initial Context factory and depends on ur JNDI service provider.
    PROVIDER_URL is the url of the JNDI server containing protocol/ip/port
    do i need to use this??
    would appreciate your help on this....
    Thanks

    If Tomcat is your servlet/JSP engine, they have a nice bit about how to do it:
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html
    MOD

  • How to use runtime datasource with crystal to generate reports

    Hi,
    I am new to BO Crystal reporting area. In my appliaction I am trying to use runtime data source. My objective is to use a 'List of Java ValueObject(class holding private attributes with public getter setter)s' as report database. I am using version BO XI 3.0.
    As per development guide I have to perform the following steps to use runtime datasource
    1. Put your manipulated data in a RowSet form that can be processed.
    2. Create and fill an com.crystaldecisions.sdk.occa.report.data.IDataset object with the rowset data.
    3. Add or set the data source with either the addDataSource or setDataSource methods of DatabaseController class.
    API doesn't allow me to set/add "Record"/ "RecordBatch" to RowSet. Please help.
    Please note: I have already tried and understand the usage of following types of data sources
    1. All types of db conductivities as provided by Crystal designer "Database Expert"
    2. Also I have successfully tried & tested transforming "List of Java VOs" into XML, TXT, CSV file format and use them as data source for crystal.

    Frank Bareuther wrote:
    The DBMS is the same, we are only using a different database user to log on.
    There is a separate db user for each server.
    The EAR with a given datasource name in the entity EJBs should be deployed
    on all 4 servers without changing descriptors.Interesting. And what is the value of using a different schema/user in the
    different servers? I do believe that this configuration issue can be
    achieved but I have not done it myself. I believe there is a way to
    have some portions of a managed server's configuration by in a per-server
    config file. That would be where you would define the pool. The DataSource
    could also be there (with the same name for every server), or it could
    be in the common one in the admin server.
    I would file a support case to get this documented to show you how to
    do what you want.
    Joe

  • How can I use SQL TOOLKIT concurrently with Database Connectivity ?

    I have installed LabVIEW 6.1 with the Database Connectivity Toolkit and the SQL Compatibility Toolkit (e.g. _SQL folder). I am trying to make the transition from the SQL Toolkit VIs to the Database Connectivity toolkits, but for compatability with existing systems I would like to be able to run the two sets of VIs concurrently (but not in the same app).
    When I read into 6.1 a connection VI that I wrote with LabVIEW 6.0 and the SQL toolkit the connection reference type gets changed from a number to type connection (see attachments) . Does compatbility mean that my SQL toolkit VIs are converted to a form compatible with the new ADO ?
    Can I use the SQL Toolkit VIs or the Database connectivit
    y VIs in the same installation of 6.1 ?
    Can I have the SQL Toolkit VIs appear on the functions pallette and function as they did when only the SQL toolkit was installed ?
    Attachments:
    CNNCT.vi ‏20 KB
    CNNCT.vi ‏22 KB

    In response to your #2 below:
    Actually it is possible to have the old SQL Toolkit and new Database
    connectivity in the same installation of LabVIEW. I have only tried it on
    6i, but don't see why it wouldn't work on 6.1. The trick is not to install
    the SQL toolkit compatabitily VI's. The old SQL toolkit uses the Intersolve
    dll through ODBC while the new Database connectivity uses ADO so it is
    possible to use both methods not only in the same LabVIEW install, but it
    the same running application. It has been a while since I originally did
    this, so I am posting only to mention that it is possible and not exactly
    how to do it. If anyone is interested in more details just respond.
    Brian
    "Jeff B" wrote in message
    news:[email protected]...
    > First, direct answers to your direct questions:
    >
    > 1. Does compatbility mean that my SQL toolkit VIs are converted to a
    > form compatible with the new ADO ?
    >
    > Yes
    >
    > 2. Can I use the SQL Toolkit VIs or the Database connectivity VIs in
    > the same installation of 6.1 ?
    >
    > No
    >
    > 3. Can I have the SQL Toolkit VIs appear on the functions pallette
    > and function as they did when only the SQL toolkit was installed ?
    >
    > No
    >
    >
    > Now an elaboration:
    >
    > Having the old SQL Toolkit and the new Database Connectivity Toolset
    > installed on the same version of LabVIEW on the same computer is not
    > supported.
    >
    > Once you install the Database Connectivity Toolset, any VIs written
    > with the SQL Toolkit will run, but with the ADO layer, as you
    > suspected.
    >
    > Internally, the only way we can have both the SQL Toolkit and the
    > Database Connectivity Toolset installed on the same computer for
    > troubleshooting customer issues is to have them installed on different
    > versions of LabVIEW. I, for example, have LabVIEW 5.1.2, 6.0.3, and
    > 6.1 all installed on my computer, and I have the SQL Toolkit install
    > on LabVIEW 5.1.2, and the Database Connectivity Toolset installed on
    > LabVIEW 6.0.3. In this configuration I can still run SQL Toolkit VIs
    > independent of the Database Connectivity Toolset if I open and run
    > them in LabVIEW 5.1.2.

  • Help me !!!how to use a DataSource to play and save at the same time??

    I create a DataSource :
    DataSource ds = Manager.createDataSource(new MediaLocator("rtp://192.168.2.195:10000/audio"));
    use this DataSource to create a cloneable DataSource:
    ds = Manager.createCloneableDataSource(ds);
    use this cloneable DataSource to create two datasource "saveDataSource" and "playDataSource",playDataSourceis used to play,saveDataSource is used to save;
    DataSource playDataSource = ((SourceCloneable)ds).createClone();
    DataSource saveDataSource = ((SourceCloneable)ds).createClone();
    Player player = Manager.createRealizedPlayer(playDataSource);
    player.start();
    but i can not hear anything ,if i use ds to create a player ,i can hear the voice.
    who can help me ,THX

    Thanks you ,now I can play with a clone dataSource ,but i also have a problem about how to save the voice to a local file .
    MediaLocator audioFile = new MediaLocator("rtp://192.168.2.210:"+audioPort+"/audio");
                             DataSource ds = Manager.createDataSource(audioFile);
                             Processor processor = null;
                             processor = Manager.createProcessor(ds);
                             processor.configure();
                           boolean result = waitForState(processor, processor.Configured);
                           if (result == false)
                               System.err.println("configuring failed");
                           processor.setContentDescriptor(new ContentDescriptor(ContentDescriptor.RAW));
                           processor.realize();
                           result = waitForState(processor, processor.Realized);
                           if (result == false)
                               System.err.println("realizing failed");
                           processor.start();
                           ds = processor.getDataOutput();
                           DataSource playDataSource = Manager.createCloneableDataSource( ds );
                           String type = com.sun.media.MimeManager.getMimeType("wav");
                           type = ContentDescriptor.mimeTypeToPackageName(type);
                           Processor saveProcessor = Manager.createRealizedProcessor(new ProcessorModel(ds,null,new FileTypeDescriptor(type)));
                           Player player = javax.media.Manager.createPlayer(playDataSource);
                           DataSink dsink = Manager.createDataSink(saveProcessor.getDataOutput(), new MediaLocator("file://D:/record/1234.wav"));
                             System.out.println();
                             System.out.println("-> Playing file '" + audioFile + "'");
                             System.out.println("   Press the Enter key to exit");
                             player.start();
                             dsink.open();
                             dsink.start();
                             saveProcessor.start();i can save a file ,but it can not play.

Maybe you are looking for

  • Keyboard and trackpad delay when opening.

    Well whenever my MacBook pro goes to sleep (when i close the lid) when I open the lid it wakes up... Tell us something we dont know. But when it wakes up there is like a 2 second delay before my keyboard and trackpad become responsive, and whiles I e

  • Custom field in the attachment in shopping cart

    Hi, Can anybody please help me on how to add a custom field into the Shopping cart attachment? I need to add a custom field in for each attachment in SRM? As in adding custom field into SC basic item / Account assignment, i could not find any structu

  • Submit Button always active

    I have online fillable pdf forms. but it is quite irritating as I have a few forms that our customers fill in and they can submit multiple times and all it says at the top is form data sent. How  can the submit button be deactivated when the forms is

  • Structural Access Restriction

    G'day all. I am wondering what are options available in SAP if we'd like to put additional user restriction base on organisation structure. I know the  structural authorization but if we don't have HR module, what sort of options available in the sta

  • Is there any Oracle Form development Standards?

    well me is new to oralce soo can any one help me to privide me the document or link or any reference material regarding the standard that is provided by the oracle co-operation for the its developer suite product development i will also appricatie th