How TO use configurable Database connection with ADF BC

I have developed a simple JSF/ ADF BC web application that connects to a database and read/display data from the db tables. I have successfully deployed the application to Tomcat 5.5.17. However, now i need to change the database the application is connecting to. My question is How can I change the Database connection without having to change the application modules or rebuild the war file ??? In other words, is there a specific file (xml) where the database connection can be changed?

If you set up the application with a data source (I am not sure if this is possible using another app server, I use OC4J), then you would just change it there. However if you created a database connection in the JDEV and pointed your data model to that, then you will have to change and rebuild.
You might be able to edit the xml file that contains the setttings, I am not sure my CM guys dont allow this, all of our changes have to go through our code repository.

Similar Messages

  • How to use JDBC database connection in Solaris

    Hi all,
    I am new to Solaris and i want to create an application using JDBC database connection.
    I want a small piece of code, probably a login page code that verifies the username from a OpenOffice database (.odb) file. I am particular to know the driver name, etc. If possible give the code using JNDI loopkup.
    Thanks in advance,
    Parasou.

    Sure no problem.
    Please stand by while I do your work for you.

  • How to use the database connection bean??

    hi,
    i was created a database connection class. can teach me how to call the class at JSP.
    thanx...
    <jsp:useBean id ="dat" class ="Database" scope ="request"/>
         String sql = "INSERT INTO  table"
               "(standard,col )" +
               " VALUES " +
                                                "('a','kk')";
         public static Connection getConnection()
             throws ClassNotFoundException, SQLException
              // Load Sun's JDBC-ODBC Bridge
              Class.forName ("sun.jdbc.odbc.JdbcOdbcDriver");
              // Make a connection to JDBC-ODBC Bridge drive with
              // the connection URL, jdbc:odbc:DSN
              String url =  "jdbc:odbc:miniproj";
              return(DriverManager.getConnection(url, "anonymous", "guest"));
         public static int executeUpdate(String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(executeUpdate(getConnection(), nonSelectQuery));
         public static int executeUpdate(Connection conn, String nonSelectQuery)
             throws ClassNotFoundException, SQLException
              return(conn.createStatement().executeUpdate(nonSelectQuery));
         }

    NOTE that you should always have your classes inside packages. Some versions of Tomcat won't use them correctly otherwise.

  • How to use same database connection..... for application forms.

    hello
    im creating an database application using java swing and mysql.... it an mdi application ..... i want to know that how use a single connection for all forms in the application.... any example... coz im new for the java swing and mysql application .... ill be thankful for reply and solution....

    Crost post:
    http://forum.java.sun.com/thread.jspa?threadID=785812&messageID=4466100#4466100

  • How to use a Wifi connection with a Bluetooth and BB Curve 8320 with a laptop.

    Hello All from Paris - France-
    First soory for my poor english writing.
    My question is simply, I already use my BB Curve 8320 as a modem.
    But what I'm looking is to use my BB Curve 8320 by Bluetooth and use my WIFI connection.
    I did many search but all resultats is using the "modem  provider" and not Wifi connection.
    In advance many thanks and regards.
    Jean-Achille

    Please go to the wireless tab for all the information you need. Click the link below for instructions. Let us know how it goes.
    Checking the Wireless Settings on a Linksys Router
    Connecting a Wireless Computer to go Online Using a Linksys Router

  • How to use RAC database connection details in oc4j.xcfg files

    Hi all,
    we are using oc4j.xcfg files for the application module configuration for an ADF application. and one of the database has been configured on RAC. Any input on how to specify the RAC database details in the oc4j.xcfg file specially for the host name parameter.
    The example entry like in oc4j.xcfg is like
    ?xml version = '1.0' encoding = 'UTF-8'?>
    <BC4JConfig>
    <AppModuleConfigBag>
    <AppModuleConfig name="AppModuleLocal">
    <AppModuleJndiName>dbta.model.AppModule</AppModuleJndiName>
    <DeployPlatform>LOCAL</DeployPlatform>
    <JDBCName>connectDB</JDBCName>
    <ApplicationName>dbta.model.AppModule</ApplicationName>
    <jbo.project>Model</jbo.project>
    </AppModuleConfig>
    </AppModuleConfigBag>
    <ConnectionDefinition name="connectDB">
    <ENTRY name="ConnectionName" value="connectDB"/>
    <ENTRY name="URL" value="jdbc:oracle:thin:<user>/<pass>@<server>:<Port>:<SID>"/>
    <ENTRY name="HOSTNAME" value="<server>"/>
    <ENTRY name="JDBC_PORT" value="<port>"/>
    <ENTRY name="SID" value="<SID>"/>
    <ENTRY name="ConnectionType" value="JDBC"/>
    <ENTRY name="JdbcDriver" value="oracle.jdbc.driver.OracleDriver"/>
    <ENTRY name="ORACLE_JDBC_TYPE" value="thin"/>
    <ENTRY name="DeployPassword" value="true"/>
    </ConnectionDefinition>
    how to specify the failover nodes details in the above entry for host name etc.
    Thanks
    Navin

    Here you are; all you want at
    http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/9i_jdbc/OCIdriverTAFSample/OCIdriverTAFSample.java.html

  • How can i improve database connectivity with connection pool

    Hi,
    I used to create a connection to DB per session since the application is pretty small. Now i want to improve the db connectrion with connection pool. However, i am still confused since the book i read says that i have to change something in server.xml in the tomcat server while other people in this forum actually implement a connection pool class. Isnt it has been built into the servlet container? if yes, how can i use it? I suppose i only have to open the connection and the connection pool will reclaim the resource when the session is terminated in the same way the gabage collector reclaim resource when no reference is associated to object, am i correct?
    Thai

    the documentation for Tomcat 5 DB pooling can be found at:
    http://jakarta.apache.org/tomcat/tom...les-howto.html
    Here are the Tomcat 4 docs:
    http://jakarta.apache.org/tomcat/tom...les-howto.html
    The administration console can be found at (under default install):
    http:localhost:8080/admin
    But, you have to set up a user and password in your
    <tomcat-install>/conf/tomcat-users.xml file.
    You need to add an "admin" role and a user that will be assigned this
    role like this (obviously you won't be using "tomcat" as your password):
    <?xml version='1.0' encoding='utf-8'?>
    <tomcat-users>
    <role rolename="admin"/>
    <user username="tomcat" password="tomcat" roles="admin"/>
    </tomcat-users>
    So, I can log in as Tomcat and have admin privs.
    Tomcat 5
    http://jakarta.apache.org/tomcat/tom...ger-howto.html
    Tomcat 4
    http://jakarta.apache.org/tomcat/tom...ion%20A ccess
    i'm sure this helps u

  • How to host one application using different database connection on OAS?

    Hi,
    Jdeveloper - 10.1.3.4
    Application - ADF/BC
    Oracle Application Server - 10.1.3
    Above our the specifications for our application,
    We have two database schemas different for development and production therfore we have different databse connections for the two,
    we have one application which is in production and enhacements on the same application are done by the development team.
    Since we have two different schemas for developement and prduction we use different database connections for the application on development and production.
    The problem is our Model and View Controller project are same, only the database connection file changes that's why we are able to host only on application at a time on our OAS. This is probably because the URL generated by OAS for developemnt and prodyction application is same.
    Is there a way we can host two instances of the same application with two different database connections on the a single OAS.
    Thanks & Regards,
    Raksha

    Use different deployment profiles each with a different context root for your application?
    See: http://one-size-doesnt-fit-all.blogspot.com/2009/02/configuring-separate-dev-test-prod-urls.html

  • How do i configure DSN connection to database Programmatically

    Hi to all,
    Can anybody assist me as how could i configure DSN connection to database Programmatically.
    Thanks in advance.
    Regards
    khiz_eng

    Hi DrClap,
    Many thanx for your advise, i have also done with MS-Access but now i wnated to have with .csv value, how i am going to have this .I have searched the whole JDBC forum already unable to find for .csv
    Please provide me and solve my problem
    Thanks in advance.
    khiz_eng

  • When using the Database Connectivity Toolset, reads and writes with long binary fields are incompatible.

    I am trying to write LabVIEW Variants to long binary fields in a .mdb file using the Database Connectivity Toolset. I get errors when trying to convert the field back to a variant after reading it back from the database.
    I next tried flattening the variant before writing it and ultimately wound up doing the following experiments:
    1) If I use DB Tools Insert Data to write an ordinary string and read it back using a DB Tools Select Data, the string is converted from ASCII to Unicode.
    2) If I use DB Tools Create Parameterized Query to do an INSERT INTO or an UPDATE operation, specifying that the data is BINARY, then read it back using a DB Tools Select Data,
    the length of the string is prepended to the string itself as a big-endian four-byte integer.
    I can't think of any way to do a parameterized read, although the mechanism exists to return data via parameters.
    Presuming that this same problem affects Variants when they are written to the database and read back, I could see why I get an error. At least with flattened strings I have the option of discarding the length bytes from the beginning of the string.
    Am I missing something here?

    David,
    You've missed the point. When a data item is flattened to a string, the first four bytes of the string are expected to be the total length of the string in big-endian binary format. What is happening here is that preceding this four-byte length code is another copy of the same four bytes. If an ordinary string, "abcdefg" is used in place of the flattened data item, it will come back as <00><00><00><07>abcdefg. Here I've used to represent a byte in hexadecimal notation. This problem has nothing to do with flattening and unflattening data items. It has only to do with the data channel consisting of writing to and reading from the database.
    I am attaching three files that you can use to demonstrate the problem. The VI file c
    ontains an explanation of the problem and instructions for installing and operating the demonstration.
    Ron Martin
    Attachments:
    TestLongBinaryFields.vi ‏132 KB
    Sample.UDL ‏1 KB
    Sample.mdb ‏120 KB

  • How to store jpeg images in SQL server using NI database Connectivity Toolset. Can anyone please help me in this regard.

    Please tell how to store jpeg images in SQL Server using NI Database Connectivity Toolset.

    http://www.w3schools.com/sql/sql_datatypes.asp
    You setup a field as BLOB and store the binary of the picture there. Depending on the database it can be called differently as you can see in the link, in SQL server there's even a Image datatype.
    /Y
    LabVIEW 8.2 - 2014
    "Only dead fish swim downstream" - "My life for Kudos!" - "Dumb people repeat old mistakes - smart ones create new ones."
    G# - Free award winning reference based OOP for LV

  • Please help me configure authentic connection with Caller ID via ISDN 30B+D using Cisco ACS

    /* Style Definitions */
    table.MsoNormalTable
    {mso-style-name:"Table Normal";
    mso-tstyle-rowband-size:0;
    mso-tstyle-colband-size:0;
    mso-style-noshow:yes;
    mso-style-priority:99;
    mso-style-qformat:yes;
    mso-style-parent:"";
    mso-padding-alt:0in 5.4pt 0in 5.4pt;
    mso-para-margin-top:0in;
    mso-para-margin-right:0in;
    mso-para-margin-bottom:10.0pt;
    mso-para-margin-left:0in;
    line-height:115%;
    mso-pagination:widow-orphan;
    font-size:11.0pt;
    font-family:"Calibri","sans-serif";
    mso-ascii-font-family:Calibri;
    mso-ascii-theme-font:minor-latin;
    mso-fareast-font-family:"Times New Roman";
    mso-fareast-theme-font:minor-fareast;
    mso-hansi-font-family:Calibri;
    mso-hansi-theme-font:minor-latin;}
    Hi all
    I have set up a dial up connection between to PC's at remote site and center. It using ISDN 30B+D which is configured on Router 3845. Currently I have configured authentic connection with username and password using Cisco ACS. To enhance the security configuration I want to authenticate both the phone number which dialup with Cisco ACS. And currently I have not done this. Please help me solve this problem.
    Thanks so much
    Longn

    1) I deleted bridge-utils, netcfg
    2) I edited /etc/hostapd/hostapd.conf:
    interface=wlan0
    #bridge=br0
    edited /etc/dnsmasq.conf:
    interface=wlan0
    dhcp-range=192.168.0.2,192.168.0.255,255.255.255.0,24h
    and edited /etc/rc.local:
    ifconfig wlan0 192.168.0.1 netmask 255.255.255.0
    ifconfig wlan0 up
    3) I added in autostart these daemons: hostapd, dnsmasq and iptables.
    Profit!

  • Can i use single database connection in a hole java application?

    can i use single database connection in a hole java application?.I have so many forms to use database connection.

    Theoretically you can. Not only theoretically. I've seen lots of application which only uses one database connection (they were using, oracle or mysql)
    The first reply given here assumed that the answer to
    your question depends only on the design of your
    application. That is not true.Yes it's true. Nothing in the original questions says that you aren't allowed to open or close the single connection that you have. It's looks more like the OP is interested in sharing a connection (i.e having a singleton or a connection pool with only one connection)
    It does also depend on the behaviour of the database
    in the background.
    Most databases have a time out for connections that
    are idle Not a problem. Most implementations of connection pools and applications which keeps a connection open have a timer which calls e.g. select * from dual (if you are using oracle) when the connection has been idle for X minutes.
    (some, like db2 on z/OS, even cancel
    connections, that are not idle, if they are open a
    certain amount of time or have reached a given limit
    of cpu seconds.)You would also have that problem if you had a connection pool with several connections.
    In essence: If you have no control over the time
    your application runs (and therefore your connection
    is open) or over type or the configuration of the
    database you are accessing, you can't do it.See above.
    The closest thing to what you want would be using
    PooledConnections, iif those are supported for the
    database you want to access.Not true.
    Kaj

  • How To Use Your Own Router with Out Loosing Verizon's FIOS Services

    How to use your own router with Verizon’s FIOS Service
    First, you need a basic understanding of how FIOS works but unfortunately there are two types of FIOS systems out there. All of the systems utilize a fiber optic cable to bring TV, phone and internet to your location over one optic cable. In addition these systems provide interactivity including widgets, remote DVR, movies on demand and so forth via an IP (Internet Protocol) signal.  Your STB (Set Tip Box) requires both a video and IP signal. The IP signal is necessary for all of the aforementioned interactivity.  The fiber cable terminates at the Optical Network Terminal or ONT for short.  The ONT converts the optics into a digital signal that can be utilized by ones equipment.  From the ONT your video, phone and internet are provided to the location.  This is where things can differ as the internet signal can be provided via a coaxial (MoCA or Multimedia over Coax Alliance) or RJ45 Cat5 (Ethernet) cable.  It is important to identify and understand the differences of these two setups.  In my case I have my internet entering via Ethernet cable, which in my humble opinion makes things a heck of a lot easier.
    How does one tell the difference? In most cases it’s rather simple; just look at the Verizon’s router WAN (Wide Area Network) Port.  Does it have a RJ45 (Ethernet) or Coax (TV cable Cord) going to it? If the router’s WAN port doesn’t have a coaxial connector then one will need to convert the MoCA signal into a usable Ethernet signal that routers understand. The easiest way is to use Verizon’s router as a bridge. In this method the Verizon’s router simply converts the signal and passes it along to your own router. The challenge is to try to maintain the interactivity that FIOS TV provides. Because of this one needs to supply the IP routed signal back to the FIOS router.  There are multiple methods for doing this and I would recommend investigates which one make the most sense.   
    In my particular case the IP signal was provided by Ethernet.  Again there are various ways of installing one’s own router. The hardest is to utilize Verizon’s router as a bridge.  This setup requires configuring Verizon’s router as a bridge and also creating a VLAN (Virtual Local Area Networks). In addition one needs to set up their own router so it will work with the various routing tables and networks. For me this is too complex for the average person and it can be difficult to trouble shoot if something goes wrong. Please consider that Verizon will not support utilizing third party routers.   
    The easier method is to request an Ethernet signal (if you don’t already have one) from their ONT.  I would highly recommend getting your hands on a NIM or Network Interface Module. This device is used to convert Ethernet to Coaxial so it can be fed back to your STBs.  These can be purchased online and Verizon technicians can be a valuable resource with these sorts of acquisition.  At the very least they can point you to the right direction.  Once you have a NIM the rest is rather simple.
    Log into the current Verizon Router.
    Located the router’s MAC address and copy it down.
    Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.
    Look at your current device list, typically found on the home screen. Copy down your STB MAC and IP address.
    Example:
    IP-STB1
    Connection Type: Ethernet
    * IP Address: 192.168.1.100
    IP Address Allocation: DHCP
    *MAC Address:                07:73:fFe:ad:8b:3f
    * Things you will need to write down
    Go to the network section and look for the main Ethernet connection.  Select this and then select more setting, typically found at the bottom. Release the current lease.
    Remove the Verizon router
    Install your router
    Connect the NIM by plugging in an Ethernet from one of the routers LAN (Local Area Network) ports to your NIM. Then connect the coax cable, the same cable that was used by Verizon router.
    Set you DHCP routing IP pool to accommodate Verizon’s STB IP’s  (note their IP’s start at 192.168.1.100)
    Go to DHCP section and reserve the STB IP’s by inserting the IP’s and MAC addresses. This shall ensure that nothing else utilizes the same IPs as the STBs thereby preventing IP address conflict.  
    Add the port forwards from Step 5 above.
    Clone Verizon’s Mac Address utilizing the info from step 2
    Finish setting up the router in typical fashion.
    Unplug and re-plugin your STB’s and test functionality.  It’s best to try using a widget or Movie on demand function.
    Note: if the new router can net get an internet signal contact Verizon’s support and have them release the IP and reset the ONT.  
    EVERYTHING should be working at this point.

     3 Go to the port forwarding section and copy down the Applied Rules. 
    Example:  
    Network Computer/Device: 192.168.1.100:63145
    Application & Ports Forward:  Application UDP Any -> 6347  
    Note: There may be up to three entries for each one of your Set Top Boxes.G
    Your display obviously is not like mine as mine does not dosplay the port associated with the ip address
    whatever, the STB's start at 192.168.1.100 and icement by 1 for each
    the port addr's will be 63145 alo incrementing by 1
    there is 1 entry for each in my pf list
    however each ip addr also has a port entry starting at 35000 also incrementing by 1 for each ip addr
    For some unknow reason these are duplicated e.g I appear to have 11 entries exaactly the same for each stb and as the fios services rules have no action switc there is nowhere to delete the extraneous garbage.
    Why do you clone the mac addr??

  • How to use digital av adapter with iphone4

    How to use digital av adapter with iphone4

    you can connect it to the iphone4's connector and then you can start an app which support av out like apples video app and then it will display on the tv connected
    the iphone4 don't support mirror though so only apps which support tv out will work with it

Maybe you are looking for