Dynamic JDBC URls at Runtime

Hi Experts,
I did my application in jdev 11.1.1.6 and deployed using Jdbc Url connections and it worked successfully (Actually I m working with 2 diff Database connectiosn in my application)
But the thing is my company need me to do something like I should be able to dynamically use Jdbc url connections at runtime so that they want to have QA db and PROD db inside the application
and dynamically change them itseems. (i.e I will have 4 Db in which 2 for QA and 2 for PROD)
Is there a way where I can achieve them. If so help me out.
Thanks,
933601

Hi,
You could store the database URLs in a properties file in the app server filesystem, then look them up in the dynamic JDBC code before setting the session attributes. So your QA app server has a properties file containing the URLs for the 2 QA databases and the PROD app server has a properties file containing the URLs for the 2 PROD databases.
If you want a single app server to talk to multiple sets of databases you could pass a parameter to the login screen. Based on this you decide which database(s) to connect to.
Kevin

Similar Messages

  • Dynamic JDBC URL in JClient-Application

    I want to switch between test and production database at login.
    I added JTextFields for the database server and sid in the default JCLoginDialog and set the parameters Configuration.DB_USERNAME_PROPERTY and Configuration.DB_PASSWORD_PROPERTY in the method getInfo, this works.
    But when I set the parameter Configuration.DB_CONNECTION_PROPERTY with the jdbc url, this was ignored.
    Is this the wrong way to switch between database connections?

    I want to switch between test and production database at login.
    I added JTextFields for the database server and sid in the default JCLoginDialog and set the parameters Configuration.DB_USERNAME_PROPERTY and Configuration.DB_PASSWORD_PROPERTY in the method getInfo, this works.
    But when I set the parameter Configuration.DB_CONNECTION_PROPERTY with the jdbc url, this was ignored.
    Is this the wrong way to switch between database connections?

  • REDIRECT JDBC URL WHEN USING DYNAMIC JDBC CREDENTIALS SO NOT HARDCODED

    I have taken over an application that uses row-level security and ADF (using
    dynamic JDBC Credentials). I have been able to set the internal_connection to
    a JDBCDatasource, but cannot set the Connection Type in the Oracle Business
    Component Configuration to a JDBCDatasource. When I do, I receive errors that
    tables are not found. When I set the value back to a JDBC URL, everything
    works fine again.
    I am looking for a solution where the userid and password are not hardcoded in
    the BC4J.xcfg or a way to redirect this information, as we change our system
    passwords every nighty days. Otherwise, I will have to redeploy the
    application every nighty days.
    I did not create this application, but I am sure that you could simply follow
    the "How to Support Dynamic JDBC Credentials" article. From that point, you
    will probably be where I am, where I have the internal_connection set to a
    JDBCDataSource and working properly, but cannot set the Connection Type to
    anything where the userid and password will not be hardcoded or cause failure.
    I wanted to let you know that I have
    found the updated How to Support Dynamic JDBC Credentials
    (http://www.oracle.com/technology/products/jdev/howtos/bc4j/howto_dynamic_jdbc.h
    tml) and was going to run through the "Advanced: Supporting Dynamic JDBC URLs",
    but once I was done keying in
    env.remove(ConnectionStrategy.DB_CONNECT_STRING_PROPERTY); I received a
    depreciation message on the DB_CONNECT_STRING_PROPERTY. (Note: I am coding in
    JDeveloper 10.1.3, so this may be depreciated as of then, but the ADF Libraries
    for JDeveloper 10.1.3 are on our Oracle 10gAS 10.1.2 server.)
    I thought maybe this would resolve my issue, but I can't be sure as the
    deprecation message leads me to believe that this solution may not be viable in
    the future.
    UPDATE
    =======
    The article you are referencing is definitely an older version.
    There is a newer article for 10g at:
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    Please see if that helps.
    I have already reviewed this article.
    In fact, I have reviewed many versions of this document. I have not seen one
    created yet for 10.1.3 though (especially without JSF as our 10.1.2 AS server
    will not support it). I need to find an example or documentation that shows
    how we can keep from having the JDBC URL stored in the BC4J.xcfg or a way to
    use dynamic JDBC credentials with a JDBCDataSource. We do not want to store
    the userid and password in the application, rather, we would like to setup
    something that can be configurable from the application server.
    I think we need to use the dynamic JDBC credentials because we are using the
    row-level security, where we setup a database context for the user and only
    allow certain records of a database table to be returned to the browser based
    on that context.
    Might there be a way to still use the JDBCDataSource?

    I understand that the user provides the userid and password and that these values are setup using the Configuration class.
    However, when I am to deploy the ADF Business Module with my application, I have to specify either a JDBC URL or a JDBC DataSource in the Oracle Business Component Configuration.
    When I use JDBC DataSource, the code does not work properly, almost like the user's credentials are not used for the connection (I get errors like table or view does not exist).
    When I use the JDBC URL, the bc4j.xcfg stores a reference in the JDBCName attribute to a ConnectionDefinition in the same file. It is in this tag of the bc4j.xcfg where the userid, sid, and password (encrypted) is stored and used when retrieving the initial context of the ADF business components.
    It is these values that I want to have stored else where so that the application does not have to be redeployed in order for the password (or sid, or other connection information) to be change.

  • Dynamic JDBC with JHeadstart

    Hi I have a problem using jheadstart when appliying dynamic jdbc credentials. I dont know why but my login page comes with errors . the picture of components does not come . for example the submit button comes with no picture but a cross sign (which happens when the picture is not found) and it is same for the other components.
    When I remove
    <filter-mapping>
    <filter-name>ADFBindingFilter</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    from web.xml then they come but this time other pages are not found in navigation.
    What should I do?
    Certainly JHeadstart does override some parameters and this effects my pages. during start up. But I dont know why. You know what is so difficult about these frameworks. You have no knowledge of the underlying mechanism and when a problem occurs you can not figure out its reason . Actually I am complaning that you must write a book about JHeadstart with broader knowledge for users, guys. Without enough documentation you can not make people use it. So just think about it and please help me with my problem.
    expecting an answer soon
    write back quickly
    bye bye

    Hi,
    First, to reply to your remark about the JHeadstart team writing a book: we did! It's called the JHeadstart Developer's Guide and it's included in the JHeadstart release. Especially Chapter 5, JHeadstart Extensions to ADF Runtime, explains how the ADF Page Lifecycle works and how JHeadstart has extended that with extra functionality and how best practices have been implemented.
    Now to your problem with Dynamic JDBC: If the issue is related to the ADFBindingFilter, then it sounds like a generic JDeveloper/ADF problem, not JHeadstart specific. To simplify the test case, you could create a simple drag-and-drop ADF Application, apply the dynamic JDBC credentials to that application and see if the same problem occurs there. Then you can log a TAR at metaLink (http://metalink.oracle/com/), or ask this question at the JDeveloper forum at http://otn.oracle.com/discussionforums/jdev.html.
    Hope this helps,
    Sandra Muller
    JHeadstart Team
    Oracle Consulting

  • Receiver SOAP - How to set URL at runtime?

    I have configured a Receiver SOAP adapter for sending a cXML message to a vendor in no-soap, keep-headers mode. If I want to extend this to other vendors, I want to set the target URL at runtime. In order to do this, I am able to set the TServerLocation in the Mapping. But in the communication channel, I am not able to select this indicator. I am able to select the 'Use Adapter specific message attributes' and 'Variable Transport Binding' indicators but thats it. I am not displayed any form for selecting the target URL as the field to substitute during runtime. I am using SAP Basis 7.00 for the Adapter Metadata. Does anybody know a work around or patch I need?

    Hello James,
    I don't know whether this question is still open, but I have faced the same problem now, so here is my solution:
    It is right, that the "Target URL" field has to be filled with some "dummy" value to be able to save+activate the communication channel.
    In any other communication channels (e.g. like file adapter) you can fill in the <dummy> value. But at the SOAP receiver it doesn't work.
    Instead of <dummy>, if you fill in a real URL address, it will always take it instead of the dynamic one.
    My solution is, to fill in only the "http://" value, and it will take your dynamic URL from your UDF. (from the variable TServerLocation)
    I hope it helps!
    Best regards,
    Andras

  • Support Dynamic JDBC Credentials

    Can I use something similar in JDeveloper 11g like in this example http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html

    Here is the class
    package userinterface;
    import java.io.IOException;
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    import java.util.Iterator;
    import java.util.Map;
    import javax.servlet.FilterChain;
    import javax.servlet.FilterConfig;
    import javax.servlet.ServletException;
    import javax.servlet.ServletRequest;
    import javax.servlet.ServletResponse;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import javax.servlet.http.HttpSession;
    import javax.servlet.jsp.JspTagException;
    import oracle.adf.model.servlet.ADFBindingFilter;
    import oracle.adf.share.ADFContext;
    import oracle.jbo.client.Configuration;
    import oracle.jbo.common.JBOClass;
    import oracle.jbo.common.ampool.ApplicationPoolException;
    public class DynamicJDBCBindingFilter extends ADFBindingFilter {
    public DynamicJDBCBindingFilter() {
    public void doFilter(ServletRequest request, ServletResponse response,
    FilterChain chain) throws IOException,
    ServletException {
    HttpServletRequest svrRequest = (HttpServletRequest)request;
    HttpSession session = svrRequest.getSession(true);
    if (!isLoggedIn(session)) {
    if (!isLoginRequest(svrRequest)) {
    String method = svrRequest.getMethod();
    String requestUri = svrRequest.getRequestURI();
    if (method.equalsIgnoreCase("GET") &&
    requestUri.endsWith(loginPageRedirectName())) {
    super.doFilter(request, response, chain);
    } else {
    forwardToLoginPage(request, response);
    } else {
    try {
    String usrName = request.getParameter(USERNAME_PARAM);
    String pswd = request.getParameter(PASSWORD_PARAM);
    * If you need to support dynamically changing the JDBC URL
    * (for example to support changing which database instance
    * you are pointing at on the fly, then you need to change
    * the line of code below to assign a non-null value to the
    * jdbcURL variable. You would need to take the user-supplied
    * information and formulate a valid JDBC connection URL connection
    * string (without username and password) that looks like this:
    * jdbc:oracle:thin:@localhost:1521:ORCL
    * machine port SID
    * and then set this the jdbcURL variable to this value.
    String jdbcURL = "jdbc:oracle:thin:@10.3.3.68:1521:des10g";
    if (usrName == null || usrName.length() == 0 ||
    pswd == null || pswd.length() == 0) {
    throw new BlankUserNameOrPassword();
    session.setAttribute(Configuration.DB_USERNAME_PROPERTY,
    usrName);
    session.setAttribute(Configuration.DB_PASSWORD_PROPERTY,
    pswd);
    if (jdbcURL != null) {
    session.setAttribute(Configuration.DB_CONNECT_STRING_PROPERTY,
    jdbcURL);
    super.doFilter(request, response, chain);
    if (request.getAttribute(FAILED_ATTR) == null) {
    session.setAttribute(LOGGEDIN_ATTR, NON_NULL_VALUE);
    } catch (Exception e) {
    if (isFailedLoginException(e)) {
    signalFailedLoginAttempt(svrRequest);
    redirectToLoginPageOnLogonError(request, response);
    } else if (e instanceof ServletException) {
    throw (ServletException)e;
    } else {
    e.printStackTrace();
    throw new ServletException(e);
    } else {
    super.doFilter(request, response, chain);
    * Encapsulate detecting if the exception thrown
    * represents a failed login attempt.
    private boolean isFailedLoginException(Exception e) {
    * In 9.0.5.2, our eager AM acquisition will
    * cause the application pool exception to appear
    * without being wrapped.
    if (e instanceof ApplicationPoolException ||
    e instanceof BlankUserNameOrPassword) {
    return true;
    } else if (e instanceof ServletException) {
    Throwable rootCause = ((ServletException)e).getRootCause();
    * In 10.1.2 Struts, our lazy AM acquisition causes
    * the failed database login to be wrapped in a
    * ServletException that contains the ApplicationPoolException
    if (rootCause instanceof ApplicationPoolException) {
    return true;
    * In 10.1.2 JSP Model 1, our lazy AM acquisition causes
    * the failed database login to be wrapped in a
    * ServletException that contains a JspTagException.
    * The JspTagException does not wrap the original error,
    * but only encapsulate the original errors getMessage() value.
    if (rootCause instanceof JspTagException) {
    String errMsg = ((JspTagException)rootCause).getMessage();
    if (errMsg != null && errMsg.startsWith(APP_POOL_ERR_MSG)) {
    return true;
    return false;
    * Forwards control to the login page.
    private void forwardToLoginPage(ServletRequest request,
    ServletResponse response) throws ServletException,
    IOException {
    HttpServletResponse responseHttp = (HttpServletResponse)response;
    responseHttp.sendRedirect(loginPageRedirectName());
    markResponseCompleteIfUsingJSF();
    private void redirectToLoginPage(ServletRequest request,
    ServletResponse response) throws ServletException,
    IOException {
    HttpServletResponse responseHttp = (HttpServletResponse)response;
    responseHttp.sendRedirect(loginPageRedirectName());
    markResponseCompleteIfUsingJSF();
    private void redirectToLoginPageOnLogonError(ServletRequest request,
    ServletResponse response) throws ServletException,
    IOException {
    HttpServletResponse responseHttp = (HttpServletResponse)response;
    responseHttp.sendRedirect(loginPageRedirectName((HttpServletRequest)request) + "?failed=true");
    markResponseCompleteIfUsingJSF();
    * Signal a failed login attempt
    private void signalFailedLoginAttempt(HttpServletRequest request) {
    HttpSession session = request.getSession(true);
    session.setAttribute(LOGGEDIN_ATTR, null);
    request.setAttribute(FAILED_ATTR, NON_NULL_VALUE);
    session.invalidate();
    * If we are running in a Faces environment, invoke
    * the FacesContext.responseComplete() method after
    * the session invalidate. We use Java reflection
    * so that our code can still work in a Non-Faces
    * environment, too.
    private void markResponseCompleteIfUsingJSF() {
    try {
    Class c = JBOClass.forName("javax.faces.context.FacesContext");
    Method m = c.getMethod("getCurrentInstance", null);
    Object obj = m.invoke(null, null);
    m = c.getMethod("responseComplete",null);
    m.invoke(obj,null);
    } catch (InvocationTargetException ex) {
    throw new RuntimeException(ex);
    } catch (IllegalAccessException ex) {
    throw new RuntimeException(ex);
    } catch (NoSuchMethodException ex) {
    throw new RuntimeException(ex);
    } catch (ClassNotFoundException ex) {
    // Ignore, we're not running in a faces context.
    * Returns true if user is currently logged in
    private boolean isLoggedIn(HttpSession session) {
    return session.getAttribute(LOGGEDIN_ATTR) != null;
    * Returns true if the current request is a login request.
    private boolean isLoginRequest(HttpServletRequest request) {
    return request.getParameter(IS_LOGIN_PAGE_PARAM) != null &&
    request.getMethod().equalsIgnoreCase("POST");
    private static final String LOGIN_PAGE_REDIRECT_PARAM = "RedirectToLogin";
    private static final String FACES_URL_PATTERN_PARAM = "FacesURLPattern";
    private static final String LOGGEDIN_ATTR = "loggedin";
    private static final String FAILED_ATTR = "failed";
    private static final String USERNAME_PARAM = "form:username";
    private static final String PASSWORD_PARAM = "form:password";
    private static final String IS_LOGIN_PAGE_PARAM = "form:_loginpage";
    private static final String NON_NULL_VALUE = "x";
    private static final String APP_POOL_ERR_MSG = "JBO-30003";
    private static String loginPageRedirectName = null;
    private String facesURLPattern = null;
    private String loginPageRedirectName() {
    return loginPageRedirectName;
    private String loginPageRedirectName(HttpServletRequest request) {
    if (facesURLPattern != null) {
    if (request.getRequestURI().indexOf(facesURLPattern) == -1) {
    return facesURLPattern+loginPageRedirectName;
    return loginPageRedirectName;
    public void init(FilterConfig filterConfig) throws ServletException {
    super.init(filterConfig);
    loginPageRedirectName =
    filterConfig.getServletContext().getInitParameter(LOGIN_PAGE_REDIRECT_PARAM);
    facesURLPattern =
    filterConfig.getServletContext().getInitParameter(FACES_URL_PATTERN_PARAM);
    }

  • ADF 11g: Dynamic JDBC Credentials, how to postback paramters

    I am currently trying out dynamic jdbc example from Steve. An additional implementation I am trying to accomplish is to retain the username in the input field upon a failed login without having it displayed on the url (the example passes parameters back by putting it on the url followed by redirect). Typically this can be done by setting a new request attribute and using a forward instead of redirect, but the example has some interesting code which explicitly avoids a request forward (See below).
        private void forwardToLoginPage(ServletRequest request, ServletResponse response) throws ServletException,
                                                                                                 IOException {
            HttpServletResponse responseHttp = (HttpServletResponse)response;
            responseHttp.sendRedirect(loginPageRedirectName());
    ...Can anyone shed some light on why this is?
    -Wes

    I am currently trying out dynamic jdbc example from Steve. An additional implementation I am trying to accomplish is to retain the username in the input field upon a failed login without having it displayed on the url (the example passes parameters back by putting it on the url followed by redirect). Typically this can be done by setting a new request attribute and using a forward instead of redirect, but the example has some interesting code which explicitly avoids a request forward (See below).
        private void forwardToLoginPage(ServletRequest request, ServletResponse response) throws ServletException,
                                                                                                 IOException {
            HttpServletResponse responseHttp = (HttpServletResponse)response;
            responseHttp.sendRedirect(loginPageRedirectName());
    ...Can anyone shed some light on why this is?
    -Wes

  • [[DYNAMIC]] in URL?

    I've got an AS3 loader making a Get URLRequest on the local machine (not browser based).  The URL being reported back has this:
    file://C:\folder\foo.swf/[[DYNAMIC]]/3
    Can someone explain why [[DYNAMIC]]/3 is being appended to the URL at runtime?  No encryption has been applied to the swf file.  What does [[DYNAMIC]] mean?
    Thanks,
    Jim Leichliter

            function StartLoad():*
                var urlReq:*=null;
                ldr = new Loader();
                ldr.name = "loader" + moviesLoadStarted;
                ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);
                urlReq = new URLRequest("foo.swf");
                parentMovie.addChild(ldr);
                ldr.visible = false;
                ldr.load(urlReq);     
         function completeHandler(evt:Event):void
                var Ldr:*=Loader(evt.target.loader);
                Ldr.contentLoaderInfo.removeEventListener(Event.COMPLETE, completeHandler);
                parentMovie.movieList[0].movie_mc = Ldr.content;
                parentMovie.movieList[0].movieLdr.visible = true;
                if (masterMovieLoaded)
                    parentMovie.movieList[0].movie_mc.visible = false;
                parentMovie.addChild(Ldr);

  • Load JDBC driver in runtime

    Hi all,
    I'm trying to load mysql jdbc driver in runtime i've tried the following links
    [http://dev-loki.blogspot.com/2008/01/loading-jdbc-driver-at-runtime.html]
    [http://www.kfu.com/~nsayer/Java/dyn-jdbc.html]
    [http://www.devdaily.com/java/edu/JDBC-SQLProcessor/Simple_JDBC_Example.shtml]
    [http://tech.puredanger.com/2006/11/09/classloader/]
    [http://fdt.powerflasher.com/blog/?p=35]
    I'm not being able to get this to work it always given the classnotfoundexception
    can anyone help please?
    Thanks in advance

    There is no server. I'm doing a normal java aplication, i wanted to have a folder where would be the jdbc drivers in runtime the user will choose what driver to load to access a some db.
    I'm using eclipse and this is what i have now
    import java.sql.Connection;
    import java.sql.Driver;
    import java.sql.DriverPropertyInfo;
    import java.sql.SQLException;
    import java.util.Properties;
    public class DriverShim implements Driver{
         private Driver driver;
         public DriverShim(Driver d) {
              this.driver = d;
         public boolean acceptsURL(String u) throws SQLException {
              return this.driver.acceptsURL(u);
         public Connection connect(String u, Properties p) throws SQLException {
              return this.driver.connect(u, p);
         public int getMajorVersion() {
              return this.driver.getMajorVersion();
         public int getMinorVersion() {
              return this.driver.getMinorVersion();
         public DriverPropertyInfo[] getPropertyInfo(String u, Properties p) throws SQLException {
              return this.driver.getPropertyInfo(u, p);
         public boolean jdbcCompliant() {
              return this.driver.jdbcCompliant();
                   String libraryPath = System.getProperty("java.library.path");
              String sep = System.getProperty("path.separator");
              libraryPath = "." + sep + "C:/Users/Luis/Documents/eclipse/workspace/DBDIGGER/lib/connectors" + sep + "native" + sep + libraryPath;
              //libraryPath ="C:/Users/Luis/Documents/eclipse/workspace/DBDIGGER/lib/connectors";
              System.setProperty("java.library.path", libraryPath);
              System.out.println(libraryPath);
    URL u;
              try {
                   u = new URL("jar:file://C:/Users/Luis/Documents/eclipse/workspace/DB/lib/connectors/mysql-connector-java-5.1.7-bin.jar!/");
                   String classname = Settings.MYSQL;
                   URLClassLoader ucl = new URLClassLoader(new URL[] { u });
                   URL[] ee =ucl.getURLs();
                   Driver d = (Driver)Class.forName(classname, true, ucl).newInstance();
                   DriverManager.registerDriver(new DriverShim(d));
                   DriverManager.getConnection("jdbc:mysql://localhost:3306/mysql", "user", "pw");
              } catch (MalformedURLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (ClassNotFoundException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (SQLException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (InstantiationException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } catch (IllegalAccessException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
              } Project Folder Structure
    DB
    bin
    lib
    connectors
    mysql-connector-java-5.1.7-bin.jar
    src
    result of classpath
    .;C:/Users/Luis/Documents/eclipse/workspace/DBDIGGER/lib/connectors;native;C:\Program Files\Java\jre6\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:/Program Files/Java/jre6/bin/client;C:/Program Files/Java/jre6/bin;C:\Program Files\JavaFX\javafx-sdk1.1\bin;C:\Program Files\JavaFX\javafx-sdk1.1\emulator\bin;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\Softex\OmniPass;C:\Program Files\MySQL\MySQL Server 5.1\bin
    Maybe what i'm doing wrong is the classpath, this is not a web app is a standard java aplication...
    Could someone explain to me how to set a classpath ?? correctly...

  • BC4J/JSP Dynamic JDBC Username Audit Trail

    I have implemented a BC4J/JSP login page as per the How To "How To Support Dynamic JDBC Credentials". It all works very nicely thank you.
    How can I retrieve the application module's username (passed through from the login page) from within the doDML() method of an EntityImpl?
    I need to do this in order to maintain an audit trail of db updates.
    Thanks,
    James

    I think I should be able to use something like:
    oracle.jbo.ApplicationModule am = oracle.jbo.client.Configuration.createRootApplicationModule
    ("package.AppModule", "AppModuleLocal");
    oracle.jbo.ConnectionMetadata cm = am.getTransaction().getConnectionMetadata();
    String uname = cm.getUserName();
    But when I use this I get the error below. Any ideas?
    Error Message: JBO-30003: The application pool (rabc4j.Rabc4jModule) failed to checkout an application module due to the following exception:
    Error Message: null
    JBO-30003: The application pool (rabc4j.Rabc4jModule) failed to checkout an application module due to the following exception:
    java.lang.NullPointerException
         java.lang.Object java.util.Hashtable.put(java.lang.Object, java.lang.Object)
         void rabc4j.RaConnectionStrategy.connect(oracle.jbo.ApplicationModule, oracle.jbo.common.ampool.SessionCookie, oracle.jbo.common.ampool.EnvInfoProvider)
         void oracle.jbo.common.ampool.ApplicationPoolImpl.connect(oracle.jbo.ApplicationModule, oracle.jbo.common.ampool.SessionCookie)
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.doCheckout(oracle.jbo.common.ampool.SessionCookie)
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.ApplicationPoolImpl.useApplicationModule(oracle.jbo.common.ampool.SessionCookie, boolean)
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean, long)
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule(boolean)
         oracle.jbo.ApplicationModule oracle.jbo.common.ampool.SessionCookieImpl.useApplicationModule()
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String, oracle.jbo.common.ampool.EnvInfoProvider)
         oracle.jbo.ApplicationModule oracle.jbo.client.Configuration.createRootApplicationModule(java.lang.String, java.lang.String)
         void rabc4j.RaActionPlanImpl.doDML(int, oracle.jbo.server.TransactionEvent)
         void oracle.jbo.server.EntityImpl.postChanges(oracle.jbo.server.TransactionEvent)
         void oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(oracle.jbo.server.TransactionEvent, com.sun.java.util.collections.ArrayList, com.sun.java.util.collections.HashMap, com.sun.java.util.collections.ArrayList, boolean, boolean)
         void oracle.jbo.server.EntityImpl.postChanges(oracle.jbo.server.TransactionEvent)
         void oracle.jbo.server.DBTransactionImpl.doPostTransactionListeners(oracle.jbo.server.TransactionEvent, com.sun.java.util.collections.ArrayList, com.sun.java.util.collections.HashMap, com.sun.java.util.collections.ArrayList, boolean, boolean)
         void oracle.jbo.server.DBTransactionImpl.postChanges(oracle.jbo.server.TransactionEvent)
         int oracle.jbo.server.DBTransactionImpl.commitInternal(boolean)
         void oracle.jbo.server.DBTransactionImpl.commit()
         int oracle.jbo.html.jsp.datatags.CommitTag.doStartTag()
         void DataHandlerComponent.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.GetParametersRequestDispatcher.include(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.EvermindPageContext.include(java.lang.String)
         int oracle.jbo.html.jsp.datatags.ComponentTag.doStartTag()
         void AplanRpropFkLink.jspService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtime.HttpJsp.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void oracle.jsp.runtimev2.JspPageTable.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse, java.lang.String)
         void oracle.jsp.runtimev2.JspServlet.internalService(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void oracle.jsp.runtimev2.JspServlet.service(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse)
         void javax.servlet.http.HttpServlet.service(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.invoke(javax.servlet.ServletRequest, javax.servlet.ServletResponse)
         void com.evermind.server.http.ServletRequestDispatcher.forwardInternal(javax.servlet.ServletRequest, javax.servlet.http.HttpServletResponse)
         boolean com.evermind.server.http.HttpRequestHandler.processRequest(com.evermind.server.ApplicationServerThread, com.evermind.server.http.EvermindHttpServletRequest, com.evermind.server.http.EvermindHttpServletResponse, java.io.InputStream, java.io.OutputStream, boolean)
         void com.evermind.server.http.HttpRequestHandler.run(java.lang.Thread)
         void com.evermind.util.ThreadPoolThread.run()

  • 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. :-)

  • Questions about example "Dynamic JDBC Credentials for Model 1 and Model 2"

    Hello,
    i am trying to set up dynamic JDBC authentication in my ADF BC application - i want that it'll work like in Forms - a dababase user with the proper priveleges can log into my ADF BC application using his database login and password, and work with application.
    I've read the paper "How To Support Dynamic JDBC Credentials" at
    http://www.oracle.com/technology/products/jdev/howtos/10g/dynamicjdbchowto.html
    and test the very useful example, created by Steve Muench, which i've got from
    http://radio.weblogs.com/0118231/stories/2004/09/23/notYetDocumentedAdfSampleApplications.html#14
    The example works, but when i'm transfer its realisation in my application - it doesnt work the right way. The problems is the following:
    1. I can connect and work successfully only under the owner of the schema - the username and password of which i've wrote in the "jbo.server.internal_connection" string of the AM configuration.
    2. When i'm connecting under other users, which have all the rights to work with the db objects, used by application, i got the main page with the "Access Denied" message - as i have no priveleges to the tables.
    3. The big surprise is that if i am entering the fake username and password - the random letter combination - then i am getting the same behavior as in p.2 - the main page with the "Access Denied" message!
    And the last question is:
    4. Is it possible to set up the dynamic jdbc authentication using the build-in JDeveloper functions - i mean not to use that additional code, not override the ADF Binding Filter, and so on, but set up the similar behaviour (users log in using their db names and passwords) in several minutes following the standart documentation?
    Thanks in advance!

    One more question:
    I have 2 independent Application Modules in my application - to make the 2 transactions independent one form another, when working with different parts of project - and while using dinamic JDBC authentification, the user connects only in the first AM under the username he's entered, but the 2nd AM works under the predefined earlier (during development) connection for that AM.
    How can i make the 2nd AM to be connected under the logging in user (same as the 1rst AM)?

  • Creating a service ; What needs to be added to tnsnames.ora and JDBC url?

    DB version: 11.2.0.2
    OS platform : Solaris 10
    We have a 2 node RAC.
    DB name   = mbsprd
    Instance1  = mbsprd1
    Instance2  = mbsprd2I want Instance 1 (mbsprd1) to be used for our OLTP application and Instance 2 (mbsprd2) to be used for another application of DSS nature.
    Based on the syntax
    srvctl add service -d <dbname> -s <ServiceName> -r <Preferred Instance> -a <Available Instance>I am going to create 2 services
    -- Creating a service called OLTP
    srvctl add service -d mbsprd -s OLTP  -r mbsprd1 -a mbsprd2-- Creating a service called DSS
    srvctl add service -d mbsprd -s DSS  -r mbsprd2 -a mbsprd1-- Starting the services
    srvctl start service -d mbsprd -s OLTP
    srvctl start service -d mbsprd -s DSSI guess the above steps are enough to configure a service at the server side.
    I would like to know what needs to be done at the client side.
    Currently the tnsnames.ora file and JDBC url used by our clients are shown below. What needs to be added to tnsnames.ora file and jdbc URL to start using services configured above?
    -- SCAN based TNS entry
    mbsprd =
      (DESCRIPTION =
        (ADDRESS_LIST =
          (ADDRESS = (COMMUNITY = tcp.world)
            (PROTOCOL = TCP)(Host = p148149-scan.tpam.net) (Port = 36964))
        (CONNECT_DATA =
          (SERVER       = DEDICATED)
          (SERVICE_NAME = mbsprd)
          (FAILOVER_MODE=(TYPE=SELECT)(METHOD=BASIC))
    -- TNS entry based on local listener
    -- Instance 1
    mbsprd1 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp148-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd1)
    -- Instance 2
    -- TNS entry based on local listener
    mbsprd2 =
    (DESCRIPTION =
       (ADDRESS_LIST =
       (ADDRESS =(PROTOCOL = TCP)(HOST = hsolarp149-vip)(PORT = 36973))
       (CONNECT_DATA =
             (SERVICE_NAME = mbsprd)
             (INSTANCE_NAME = mbsprd2)
    )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:mbsprd -- Alternative version used by some clients because the above had 'some issues'
    jdbc:oracle:thin:@(DESCRIPTION=(LOAD_BALANCE=on)(ADDRESS=(PROTOCOL=TCP)(HOST=p148149-scan.tpam.net) (PORT=36964))(CONNECT_DATA=(SERVER=DEDICATED)(SERVICE_NAME=mbsprd)(FAILOVER_MODE =(TYPE = SELECT)(METHOD = BASIC)(RETRIES = 180)(DELAY = 10))))

    OLTP =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = OLTP)
    DSS =
      (DESCRIPTION =
        (ADDRESS = (PROTOCOL = TCP)(HOST = p148149-scan.tpam.net)(PORT = your_port_number))
        (CONNECT_DATA =
          (SERVER = DEDICATED)
          (SERVICE_NAME = DSS)
      )JDBC entry for RAC
    jdbc:oracle:thin:@p148149-scan.tpam.net:36964:service_name
    jdbc:oracle:thin:@new_tns_entry_description(if you would like to connect the database with particular service)
    try this and let us know any issues,

  • Driver Class name and JDBC URL Format

    Hi,
    I'm trying to use the oracle jdbc driver to connect to an (what a surprise) oracle database.
    I need a 'driver class name' and the JDBC URL Format. But I cannot find these anywhere.
    Can anyone help me out here?
    Regards,
    Laurens

    http://myjdbc.tripod.com/basic/jdbcurl.html

  • Dynamic Tray creation at runtime

    hi experts,
    we have a requirement where we are showing employee details in the tray UI element.
    we have 1 tray at design time showing employee details obtained from a Bapi.
    Now we need to display spouse details(if available) and children details(their number can be any~known at runtime) in seperate trays. eg each tray for 1 person..so if there are 6 children, there are 8 trays including one for employee and spouse...
    Now what I need is the source code  or method to dynamically generate tray at runtime along with the labels and textviews they contain..
    thanks in advance

    HI,
    solved the problem....
    i was doing some search here and there and finally got the code to do it. when i came back to the thread i found Ramesh suggested the same stuff which i had used.
    thanks gurus.
    I am writing my code here for other people looking for the same thing:
    IWDTransparentContainer container =(IWDTransparentContainer)view.getElement("RootUIElementContainer");
         wdContext.currentContextElement().setIpvalue("Demo Name");   //this is my context attribute.
    for(int i=1;i<3;i++)
         IWDTray tray=(IWDTray)view.createElement(IWDTray.class,null);
                   tray.setExpanded(false);
                   tray.setWidth("700px");
                   IWDLabel label=(IWDLabel)view.createElement(IWDLabel.class,null);
                   label.setText("your name is");
              IWDTextView textview1=(IWDTextView)view.createElement(IWDTextView.class,null);
              textview1.setText(wdContext.currentContextElement().getIpvalue());
              IWDLabel label1=(IWDLabel)view.createElement(IWDLabel.class,null);
              label1.setText("Employee age");
         IWDCaption caption =(IWDCaption)view.createElement(IWDCaption.class,null);
         caption.setText("WElcome to employee information");
                   tray.setHeader(caption);
         IWDLayout layout=(IWDLayout)tray.createLayout(IWDMatrixLayout.class); //setting tray layout to matrix
         IWDLayoutData layout1=(IWDLayoutData)label1.createLayoutData(IWDMatrixHeadData.class);
         tray.addChild(label);
         tray.addChild(textview1);
         tray.addChild(label1);
                   container.addChild(tray);
    P.S. Awarding points to Ramesh.

Maybe you are looking for

  • Data Guard is not working

    I have configured Oracle data guard in 11gR2 RAC database. In the primary database I get "ORA-16198: Timeout incurred on internal channel during remote archival" error. In the physical standby database log file there is shown consistently "Possible n

  • Backing up a live server

    Hi, it's my understanding that using Time Machine is a no-no on an OS X server running OD. What are the current favorite schemes/software for backuping up a live OS X server? - Lewis

  • Crash when saving my director file

    Hi.... I have this director file. Half the time I save changes to this file, wheater I do save as, or save....the save progress bar will get up to like 1/3 and then stop there. At this point Im forced to close my director app through the task manager

  • Not Notified of new mail

    I have an iphone 4s with several email accounts set-up.  All of them receive mail but one of them does not show any notification that mail has been received (meaning the number on the outside of the folder so I know to look in the folder).  It is get

  • How do I login to youtube on Apple TV 2nd gen

    How do I login to youtube on Apple TV 2nd gen