Database connectivity and Tomcat

I have the code
DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
Connection con = DriverManager.getConnection("jdbc:oracle:thin:@10.25.2.80:1521:TST02", "login", "teste");
Someone knows how to take the URL, Login and Password from Tomcat's server.xml
thak you

I have the code
DriverManager.registerDriver(new
w oracle.jdbc.driver.OracleDriver());
Connection con =
on con =
DriverManager.getConnection("jdbc:oracle:thin:@10.25.2
.80:1521:TST02", "login", "teste");
Someone knows how to take the URL, Login and Password
from Tomcat's server.xml
thak youNormally one would set up a named JDBC connection pool in your deployed app, and your app code would just ask the server for a connection from that named pool. Your code in that case would not need the URL nor the username nor password - all that would be in your app's config file.

Similar Messages

  • OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?

    Is there an alternative way other than manually entering PHP code?

    Thanks, It works. Author of the article politely says what many of us have to say to Adobe when they make "improvements" - WTF, Adobe???
          From: Ben Pleysier <[email protected]>
    To: Jon Lane <[email protected]>
    Sent: Saturday, January 31, 2015 1:44 AM
    Subject:  OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    OK now that there is no option to reveal "database" panel in DW CC, how do I create a database connection and build my phpmysql pages?
    created by Ben Pleysier in Dreamweaver support forum - View the full discussionWeb development tutorial
    Deprecated Server Behaviors for Dreamweaver Creative Cloud
    WebAssist A better, more secure and future proof way MySQLi Server Behaviors
    Dreamweaver extension
    WebAssist If the reply above answers your question, please take a moment to mark this answer as correct by visiting: https://forums.adobe.com/message/7148099#7148099 and clicking ‘Correct’ below the answer Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: Please note that the Adobe Forums do not accept email attachments. If you want to embed an image in your message please visit the thread in the forum and click the camera icon: https://forums.adobe.com/message/7148099#7148099 To unsubscribe from this thread, please visit the message page at , click "Following" at the top right, & "Stop Following"  Start a new discussion in Dreamweaver support forum by email or at Adobe Community For more information about maintaining your forum email notifications please go to https://forums.adobe.com/thread/1516624.

  • Too many database connections and configurator logins ?

    Hi,
    We're having some performance and/or stability problem with Oracle Waveset 8.1.1. patch 2.
    I'm not sure what the problems is yet, but two facts got my attention:
    I noticed for too many database connections waiting to be closed on the OS, varying between 600 and 1200 :
    TCP: IPv4
    Local Address Remote Address Swind Send-Q Rwind Recv-Q State
    doesburg.ic.uva.nl.33555 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33556 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33557 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    doesburg.ic.uva.nl.33558 hopewell.ic.uva.nl.1539 49640 0 49640 0 TIME_WAIT
    etc.
    (doesburg is our Solaris 10 server where the tomcat application server is installed, hopewell is our Oracle 10g database server )
    I also noticed numerous Configurator logins in the audit log, about 10 per second:
    Audit Event Details
    Timestamp 03/15/2011 04:37:05 PM MET
    Subject CONFIGURATOR
    Action Login
    Result Success
    Identity System Type User
    Object Name CONFIGURATOR
    Server DOESBURG.IC.UVA.NL
    Sequence Number No Value
    Interface BPE
    Resource No Value
    AccountId No Value
    Message No Value
    Changes No Value
    Organization Membership Top
    Event Parameters
    Session ID #SESS#15E4CCFDD2645B36:10C191A6:12EB99FCC85:-5A50
    Configurator logins on the BPE interface which we don't use?
    Has anyone seen something like this before? What could cause it?
    Greetings,
    Marijke

    I'm still struggling with this problem. Our database administrator did add some tracing, and we see these type of queries:
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT task.id, task.type, name, :"SYS_B_0", :"SYS_B_1", summary, :"SYS_B_2", :"SYS_B_3", xmlSize, :"SYS_B_4"
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT object.id, object.type, name FROM object WHERE object.type=:"SYS_B_0"
    SELECT tstamp, id, version, changeType FROM orgchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM rolechange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    SELECT tstamp, id, version, changeType FROM objchange WHERE tstamp > :1 AND type=:2 ORDER BY tstamp
    541 seperate logon sessions by waveset in about 2 minutes.
    Has anyone seen this? What could cause it?
    Greetings,
    Marijke

  • Database connection and what is the best method

    Hi - I am new at this, so hopefully someone can point me in the right direction.
    looking at a project costing form where specific users need to complete a form with some prepopulated data expense data
    The data is in a local Access database at the moment, with plans on moving it to a web sql tables.
    Overview
    I would like to be able to open a main form, select various criteria
    (ie select Project Number)
    push button to load data the specific project data
    push button to extend reader functionality and save as with a new name based on project number
    After review, push button to send PDF to user by email (email address is in the loaded data).
    User is able to save data locally on his PC (save capability with the extended reader functions)
    When user finished, he can send pdf back to me for data upload to the database
    Question 1:
    I am looking at the ODBC connection strings and javascript to do this.
    Is this possible? If so, what is the best way to do this?
    Question 2:
    Once the "extend features" has been used, can javascripts be used to load different data or extended the Reader functions can only be done after the data is loaded?
    Any help or assistance as to where to look would be greatly appreciated.

    As long as your database provides an ODBC driver then it can be used to access the DB. Please see my answers below for the rest of your queries.
    Paul
    I would like to be able to open a main form, select various criteria (ie select Project Number) push button to load data the specific project data
    <answer> This is doable. There are samples published but note that it will involve some javascript coding to accomplish
    push button to extend reader functionality and save as with a new name based on project number
    <answer> This woudl have to be done through Acrobat and woudl involve some manual intervention. Do you intend on sending the form with the data connection information to them? I woudl recommend that a separate form be used for this. The data connection may cause problems for them when they open the form (remember that they will not have access to the DB).
    After review, push button to send PDF to user by email (email address is in the loaded data).
    <answer> not an issue
    User is able to save data locally on his PC (save capability with the extended reader functions)
    When user finished, he can send pdf back to me for data upload to the database
    <answer> The form that they have will not be able to do DB connections so I woudl send back just the data. Then you can import it into your version of the form (that does DB connections) and you can do the update from that.
    Question 1:
    I am looking at the ODBC connection strings and javascript to do this.
    Is this possible? If so, what is the best way to do this?
    <comment> I just did a presentation on this topic .....here is the playback recording. It also has samples that show how to do it.
    http://adobechats.adobe.acrobat.com/p69655795/
    Question 2:
    Once the "extend features" has been used, can javascripts be used to load different data or extended the Reader functions can only be done after the data is loaded?
    <commment> The RE functionality in Reader will only allow them to save the PDF locally. I do not know how big this project is but if this is only for a few users, then I woudl buy Acrobat for your people (this gives them the ability to do the DB connection as well as RE to allow for the Customer to save the form locally). If this is a large project I woudl go down the LiveCycle Server path and woudl pre-populate the forms on the server. Note that this would be at least a 100K solution whereas the Acrobat woudl be the price of Acrobat times the number of users that you have.
    Make sense?

  • Bc4j.xcfg, database connections and deploying ADF apps to oc4j

    I'm trying to understand how to enable custom database connections on a JDeveloper ADF application deployed to a stand-alone instance of OC4J.
    All entity objects were created as ADF Business Components.
    I looks like the db connection information used by the application is stored in a file named "bc4j.xcfg".
    How would I change the database connection information between different environments, changing the server, port and password information from an OC4J instance?
    I'd like to use an OC4J defined data-sources.xml file, but am looking for the simplest approach for now.

    Tomato tomaato, call it what you will, we now have to spend time (money) figuring out how to change from using the recommended use of a "connection" from Oracle tutorials and in Oracle Press books.
    Plus, neither I nor our client can get JDeveloper ADF 10.1.3 to work on OAS 10.1.2.
    Oracle has been of little help, other than stating to follow documentation. We followed the documentation at least a dozen times and on three different install of OAS 10.1.2.
    Why doesn't JDeveloper have a check-box or button that reconfigures the application to run on 10.1.2 (J2EE 1.3), there is a check-box to change JDK versions (1.4)? This is suspect to me.
    We are going to be speaking with the client this week, and have to state the ADF application works, but NOT on OAS 10.1.2.
    Does ADF work on OAS 10.1.3, absolutely, but the client is in 10.1.2 and can not upgrade at this time.
    I've read in blogs where lots of developers have the same issues without resolution and Oracle should just come out and state that 10.1.3 does not work on 10.1.2.
    So my experience has been a mixed bag with ADF, both in terms of the software and customer support from Oracle.

  • How to create database connection and how to call it using Java

    Hi,
    Good day! I'd like to know how I can create a db connection in JDev, then use this connection to retrieve data using a Java Class? I've seen using New Gallery > Database Connection. But I'm not sure how I can access this connection using Java and display some output from the retrieved records.
    Any steps/tutorial link is appreciated.
    Thanks in advance,
    Rian

    Hi,
    If you need to access the connection in the entity object then refer http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvgen.htm#BABEIFAI i.e in MODEL.
    But if you want to access connection in ViewController part of application then you need to do it manually.For this i am giving you my code for reference.------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    import java.sql.Connection;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import java.sql.Statement;
    import javax.faces.context.FacesContext;
    import oracle.jdbc.pool.OracleDataSource;
    public class DataHandler {
    String jdbcUrl = null;
    String userid = null;
    String password = null;
    Connection conn;
    public static final String CONNECTION_STRING =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("connectionString");
    public static final String USER_NAME =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("userName");
    public static final String PASSWORD =
    FacesContext.getCurrentInstance().getExternalContext().getInitParameter("password");
    public DataHandler(String jdbcUrl, String userid, String password,
    boolean shouldConnect) throws SQLException {
    this.jdbcUrl = jdbcUrl;
    this.userid = userid;
    this.password = password;
    if (shouldConnect) {
    connect();
    public void connect() throws SQLException {
    OracleDataSource ds;
    ds = new OracleDataSource();
    ds.setURL(jdbcUrl);
    conn = ds.getConnection(userid, password);
    public Connection getConnection() {
    return conn;
    public ResultSet executeQuery(String sql) throws SQLException {
    Statement s = conn.createStatement();
    return s.executeQuery(sql);
    public void closeConnection() throws SQLException {
    if (!conn.isClosed()) {
    conn.close();
    ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • Dataview of a Database Connection and Filtering.

    I have a data connection to a SQL stored procedure, but the adding a filter to the dataview of the database connection doesn't seem to work on the front end. Is there something else that needs to be configured?

    Hi,
    From your description, you might want to fetch data from database to a Data View Web Part and apply filter on it.
    Would you mind providing more details about how you implement this in your environment? It will make other easier to find out the root cause of the issue.
    What’s more, you can take a look at the link below about
    Filtering SQL Data View Web Parts in SharePoint:
    http://roxority.com/sharepoint-zen/filtering-sql-data-view-web-parts-in-sharepoint.html
    In SharePoint, a more recommended way to access the data in a database is using
    Business Connectivity Services(BCS):
    http://www.codeproject.com/Articles/683749/Implementing-Business-Data-Connectivity-in-SharePo
    http://blogs.msdn.com/b/sharepointdev/archive/2011/02/10/173-a-step-by-step-guide-in-designing-bcs-entities-by-using-a-sql-stored-procedure.aspx
    More information about Business Connectivity Services in SharePoint 2013:
    http://technet.microsoft.com/en-us/library/ee661740(v=office.15).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • Database connection and recordsets

    I have set up a database connection (to an Access database)
    and set up .asp pages to display various results. This works OK in
    the testing server apart from web links. How do I make those
    database fields which contain web addresses function as links? Is
    it to do with bindings? As you can probably tell, I'm quite new to
    Dreamweaver.
    Thanks

    Use the link fields and on the dialogue box that opens,
    choose the radio
    button that says "From Data Sources" instead of "File
    System". That will
    open up the access to the database fields and you can choose
    them.
    The link that results looks like this format:
    page2.asp?MyID=<%=myid %>
    Nancy Gill
    Adobe Community Expert
    Author: Dreamweaver 8 e-book for the DMX Zone
    Co-Author: Dreamweaver MX: Instant Troubleshooter (August,
    2003)
    Technical Editor: Dreamweaver CS3: The Missing Manual,
    DMX 2004: The Complete Reference, DMX 2004: A Beginner's
    Guide
    Mastering Macromedia Contribute
    Technical Reviewer: Dynamic Dreamweaver MX/DMX: Advanced PHP
    Web Development
    "fulmar57" <[email protected]> wrote in
    message
    news:g50pqa$9p7$[email protected]..
    >I have set up a database connection (to an Access
    database) and set up .asp
    > pages to display various results. This works OK in the
    testing server
    > apart
    > from web links. How do I make those database fields
    which contain web
    > addresses function as links? Is it to do with bindings?
    As you can
    > probably
    > tell, I'm quite new to Dreamweaver.
    > Thanks
    >
    >

  • Lan Database and Wireless Database Connectivity and Settings

    Some one help me that what the difference in LAN connectivity and connectivity over a wireless network.
    Is any difference. If difference than please send me some material to understand this.
    Thanks

    From the Oracle perspective, there is no difference where the communication comes from, as long as access through a supported protocol is established. So, from this perspective, all rules that apply to regular connectivity applies to wireless.

  • Database Connection stops Tomcat service

    Hi,
    I have a servlet runnning on tomcat 5.5. I am able to query the database and return results in a new page. AT this point if I hit the back button or type in the link for the original index.html page and resubmit my query, Tomcat service stops and I get an error message.
    Can anyone help
    ackage cpecode;
    import java.io.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import java.util.*;
    import java.sql.*;
    import java.lang.*;
    import java.text.*;
    public class cpeLogin extends HttpServlet {
    private Statement st = null;
    private Statement st2=null;
    private Connection c = null;
    private String URL = "jdbc:odbc:cpeSQL";
    //private String URL="jdbc:sqlserver://localhost:1433;"+"databaseName=cpeSQL;user=sa;password=administration10;";
    private String query,query2;
    private ResultSet rs=null;
    private ResultSet rs2=null;
    private HttpServletRequest req;
    private HttpServletResponse res;
    private PrintWriter output;
    private String ss,dob,lname,fname,keyfields,email,phone;
    private Locale currentLocale=new Locale("en","US");
    private SimpleDateFormat formatter=new SimpleDateFormat("MM/dd/yy",currentLocale);
    private SimpleDateFormat formattert=new SimpleDateFormat("hh:mm",currentLocale);
    private String apdate, compdate, dateofaction, action, course, comment;
    private int keyfield,seatint;
    private String wdate,wtime,room,seats,radioout;
    public void init(ServletConfig config) throws ServletException{
    super.init(config);
    try {
    Class.forName( "sun.jdbc.odbc.JdbcOdbcDriver" );
    //Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    c =
    DriverManager.getConnection( URL, "sa", "administration10" );
    //DriverManager.getConnection(URL);
    catch ( Exception e ) {
    e.printStackTrace();
    c = null;
    return;
    public void doGet( HttpServletRequest req,
    HttpServletResponse res )
    throws ServletException, IOException{
    this.req=req;
    this.res=res;
    ss = req.getParameter( "ss" );//field is named this in database
    dob=req.getParameter("dob");
    lname=req.getParameter("from");
    email=req.getParameter("email");
    phone=req.getParameter("telnr");
    output = res.getWriter();
    res.setContentType( "text/html" );
    //output.println("<h1>test</h1>");
    //check that id is valid
    try{
    st=c.createStatement();
    query="Select * from simb103 where sslastfour='" + ss + "' and dob='" dob"'";
    rs=st.executeQuery(query);
    boolean moreRecords = rs.next();
    // If id does not exist, display a message
    if ( ! moreRecords ) {
    output.println("<FONT COLOR='#000000'><H1><U>CPE REGISTRATION</U></H1><HR>");
    output.println( "<H3> Invalid DOB or SS. Press Back Button and try again.</H3></FONT>" );
    output.close();
    st.close();
    c.close();
    return;
    lname=rs.getString("lastname");
    fname=rs.getString("fname");
    //for testing connection
    if (moreRecords) {
         output.println("<HTML>");
                        output.println("<HEAD>");
                        output.println("<FONT COLOR='#000000'><TITLE><CENTER>CPE REGISTRATION<HR></TITLE></HEAD><BODY>");
                        output.println("<H1><CENTER>YORK COLLEGE CPE REGISTRATION</H1></CENTER>");
    output.println(ss);
    output.println("<p></p>");
    output.println(query);
    output.println(rs.toString());
    output.println(lname);
    output.println(rs.getString("dob"));
    output.println("</font></html>");
    output.close();
    st.close();
    c.close();
    return;
    public void destroy(){
    try {
    if (c !=null){
    c.close();
    catch( Exception e ) {
    System.err.println( "Problem closing the database" );
    index.html
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <!-- saved from url=(0014)about:internet -->
    <HTML lang="EN">
    <HEAD>
    <TITLE>YORK COLLEGE CPE REGISTRATION</TITLE>
    <META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <META NAME="description" CONTENT="">
    <META NAME="keywords" CONTENT="">
    <LINK href='../basic.css' rel='stylesheet'>
    <LINK rel="shortcut icon" href="../img/siteicon.ico" type="image/x-icon">
    <LINK REL=Contents HREF="index.html">
    <LINK REL=Home HREF="../index.html">
    <LINK REL=Search HREF="../search.htm">
    <LINK REL=Author HREF="contact.html">
    <SCRIPT TYPE="text/javascript" src=cpeval.js>
    </SCRIPT>
    <STYLE TYPE="text/css">
    @import url(../extrastyles.css);
    @import url(formval.css);
         .runinhdr { font-weight: bold; font-size: 50%; padding-right: 1em; }
    </STYLE>
    </HEAD>
    <BODY>
    <DIV ID="page">
    <DIV ID="wmbanner">
    <H1>YORK COLLEGE CPE REGISTRATION</H1>
    </DIV>
    <SCRIPT TYPE="text/javascript">
    // Only script specific to this form goes here.
    // General-purpose routines are in a separate file.
    function validateOnSubmit() {
    var elem;
    var errs=0;
    // execute all element validations in reverse order, so focus gets
    // set to the first one in error.
    if (!validateTelnr (document.forms.demo.telnr, 'inf_telnr', true)) errs += 1;
    if (!validateEmail (document.forms.demo.email, 'inf_email')) errs += 1;
    if (!validatePresent(document.forms.demo.from, 'inf_from')) errs += 1;
    if (!validatess (document.forms.demo.ss, 'inf_ss', true)) errs += 1;
    if (!validatedob (document.forms.demo.dob,'inf_dob', true)) errs += 1;
    if (errs>1) alert('There are fields which need correction before sending');
    if (errs==1) alert('There is a field which needs correction before sending');
    return (errs==0);
    </SCRIPT>
    <FORM NAME=demo onsubmit="return validateOnSubmit()" METHOD=GET ACTION="cpeLogin">
    <TABLE CLASS=formtab SUMMARY="CPE REGISTRATION FORM">
    <TR>
    <TR>
    <TD><LABEL FOR=ss>Enter Last Four Digits of SS#:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="ss" ID="ss" SIZE="35" MAXLENGTH="4"
    ONCHANGE="validatess(this, 'inf_ss', true);"></TD>
    <TD id="inf_ss">Required. </TD>
    </TR>
    <TR>
    <TD><LABEL FOR=dob>Enter your Date of Birth (yyyymmdd): </LABEL></TD>
    <TD><INPUT TYPE=text NAME="dob" ID="dob" SIZE="35" MAXLENGTH="8"
    ONCHANGE="validatedob(this, 'inf_dob', true);"></TD>
    <TD id="inf_dob">Required.</TD>
    </TR>
    <TD STYLE="width: 10em">
    <LABEL FOR=from>Your name:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="from" ID="from" SIZE="35" MAXLENGTH="50"
    ONCHANGE="validatePresent(this, 'inf_from');"></TD>
    <TD id="inf_from"></TD>
    </TR>
    <TR>
    <TD><LABEL FOR=email>Your e-mail address:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="email" ID="email" SIZE="35" MAXLENGTH="50"
    ONCHANGE="validateEmail(this, 'inf_email');"></TD>
    <TD id="inf_email"> </TD>
    </TR>
    <!-- Note: the element to receive error messages must contain some data (for most,
    if not all, browsers). A   is sufficent. -->
    <TR>
    <TD><LABEL FOR=telnr>Your telephone number:</LABEL></TD>
    <TD><INPUT TYPE=text NAME="telnr" ID="telnr" SIZE="35" MAXLENGTH="25"
    ONCHANGE="validateTelnr(this, 'inf_telnr', true);"></TD>
    <TD id="inf_telnr">Required. 10 digits only.</TD>
    </TR>
    <TR>
    <TD> </TD>
    <TD><INPUT TYPE="Submit" NAME="Submit" VALUE="Send"></TD>
    <TD> </TD>
    </TR>
    </TABLE>
    </FORM>
    <HR> <!-- ====================================== -->
    </BODY>
    </HTML>
    Kaminie

    Hi srini
    My intention is try to install oracle soa suite 11g ,for that my prerequisites are ,installing a database (for that i installed oracle 11g r2 instead of oracle 10g database ),installation was successful,
    after that i installed weblogic server 1033(weblogic server 11g)
    when i am trying to install rcu script ,its giving invalid service name ,i guess the script is meant for creating tables in the database ,i am following the below document for installing Rcu script
    http://blogs.oracle.com/SOA/2009/08/installing_oracle_soa_suite_11.html
    here in this above document it says that install the XE database, but for installing oracle soa suite 11g installing 10g database is not recommended, that the reason why I installed oracle win32_11gr2_database ,can please suggest me the solution for installing the rcu scriprt on oracle 11g database
    OS I am using:windows xp servicepack 2
    Serice name I used:XE
    Port:1521
    Thanks
    Dileep.k

  • Database connection and display in JSP page

    hi,
    I am new to SAP netweaver. I have created a project using JSPDynPage, Beans and java file. I have configure the datasouce in Visual Composer. I deploy the project on the portal itself. I have try all kinds of codes bt cannot retrieve. Is there anyone can give a same codes for mi to connect to the datasource in Visual Composer and able to retrieve data, insert data and update data in SQL Server 2000. Thanks
    Regards,
    shixuan

    Hai Shixuan,
    Refer this link. I will helps
    Access data from SqlServer through Visual Composer.....?
    http://help.sap.com/saphelp_nw2004s/helpdata/en/fe/68e343cc68414da4426258d3e896ae/content.htm
    Write this code wher you need in JSPDynPage
    And
    MSSQL DataBase Access -> Help me
    Thanks and Regards
    Venkatesh
    Message was edited by:
            Venkatesh Ranganathan
    Message was edited by:
            Venkatesh Ranganathan

  • Basic Database connection and run querry.

    Hi, I pretty new to java, So if any can help, please do.
    All i want to do is connect to a sql database and run a querry, return the results and then output them as XML.
    I have no idea where to start!
    Please Help.

    JDBC resources:
    http://java.sun.com/products/jdbc/download.html
    http://java.sun.com/docs/books/tutorial/jdbc/basics/
    http://developer.java.sun.com/developer/technicalArticles/Database/dukesbakery/
    http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/JDBC20.html#JDBC209_1
    XML resources:
    http://wwws.sun.com/software/xml/
    http://java.sun.com/xml/
    http://developer.java.sun.com/developer/codesamples/xml.html
    http://developer.java.sun.com/developer/technicalArticles/xml/JavaTechandXML/
    These may give you a start.
    You can use the advanced search across the user forums or the Sun site to find many more examples and problem solutions.
    Also the google search engine is very good for searching the web for java information.
    rykk

  • Need help with database connection and trasaction!

    Hi, I'm trying to load data from a huge report to DB2. My old way of doing this is: 1. using DriverManger.getConnection to get a connection.
    2. Then set autoCommit to false.
    3. Keep the connection open.....
    4. con.commit once I reach a section, let's say around 5000 records per section.
    5. Close the connection once I finish loading, (Finally block)
    I'm still new in the java world and kind of concern of the way of what I'm doing. Then I did some research. Perhaps using javax.sql.DataSource is a better approach. But I couldn't use it in WSAD. Do I need do some configuration? I heard it's in j2ee 1.4 . Is that the reason I couldn't use it?
    And.......I tried to use DAO pattern to talk with DB. By that way, I have to open and close connection everytime I invoke the dao method. Then how can I control the transaction? Because I don't want to insert each record data in to the table right away. I want to do the commit once I get all records for one section. No idea how can I achieve this.
    Any suggestion will be really appreciated!!!

    I'm still new in the java world and kind of concern
    of the way of what I'm doing. Then I did some
    research. Perhaps using javax.sql.DataSource is a
    better approach. But I couldn't use it in WSAD. Do I
    need do some configuration? I heard it's in j2ee 1.4
    . Is that the reason I couldn't use it?What you need to do is configure a Connection datasource. WSAD has that. You just need to go through the documentation and find out. I never worked on it.
    And.......I tried to use DAO pattern to talk with DB.
    By that way, I have to open and close connection
    everytime I invoke the dao method. Then how can I
    control the transaction? Because I don't want to
    insert each record data in to the table right away. I
    want to do the commit once I get all records for one
    section. No idea how can I achieve this.Since you want to simply insert multiple records, you might want to insert them in a batch. This is available in PreparedStatements.
    $ Carol.

  • Production and Development Database Connections

    Within JDeveloper I have created a database connection to a DEVELOPMENT database and am exposing PL/SQL packages in the development database as web services.
    I can develop and test successfully the exposed packages as web services, and can deploy and run them to a standalone OC4J container on my local machine.
    I then handover the generated EAR file to the production team who deploy the EAR as a web service to the Oc4j container in a remote 9i Application Server.
    This runs successfully from 9iAS.
    So far so good.
    If I have the same PL/SQL package in a live database and development database, but only have access to the development database, how can I expose the package in the live database?
    Can I have a database connection in JDeveloper with a connection name pointing to the development database connection, and have a connection defined in 9iAS with the same name pointing to the live database?
    Any information will be useful.
    Thanks,
    Claire.

    Per the J2EE "roles" definition this is a deployment role todo.
    I.E. the theory is; take a 3rd party ear, depoyee with your appserver vendor's
    deployment tool, edit the data-sources.xml imbeded in the ear on the fly, as
    deployment happens.
    Bake to reality-
    OC4J 903 is intended to be used with OEM for the J2EE spec'ed role of deployer. I'm
    headed this way, but not started the 903/OEM todo.
    Today, OC4J 902 and 902 Jdev, I deploy to a local instance of OC4J. I take that
    ear to production. I've written procedural instructions on poping open the ear and
    editing the data-sources.xml for the DB connection URL and possible login/passwords.
    BTW all your AppModule configurations will have to use data-sources DB connections else
    you'll have DB connection info littered in your bc4j.xcfg's for each AM deeper in your war's.
    I'd like to hear how this is supposed to work from some other folks? :)
    Good luck,
    curt

  • Destroy() in Servlet - cleaning up some Database info before Tomcat shutdow

    Problem:
         This is a client server application that uses Tomcat as the server.
    The application is made of applets and servlets.
    when the client applciation is running, the user deliberately closes the server,
    as a result all the client application doesn't get any data from the server.
    Here, we need to do some cleaning process before the Tomcat completely shutdown.
    The cleaning process involves interaction with database, getting the data from it, using that data to clean-up some other data.
    We added this functionality to the destroy() method of Servlet.
    When the server is shutdown deliberately when the clients are running, this destroy method give chance for each client to clean-up some resources in use.
    However when we add that functionality to this destroy() function,
    it throws SQL exception, unknown resource.
    The DBconnection is throwing error here.
    I have put like this
    synchronize( dbConnection ) {
         // db interaction
         // some clean up process
    then also its throw exception
    refused to open dbconnection
    at this time only it happens like this...
    Please help me...
    any inputs?
    any thoughts?

              "Arunachalam" <[email protected]> wrote:
              >
              look at FAQ
              >Hi,
              >I have coded a servlet to poll the database.It internally uses the Thread
              >Pool
              >to do some
              >business validation on the polled db records.Polling Thread object is
              >created
              >in init() method.
              >All the clean up activity,release of database connection and and killing
              >the thread
              >
              >take place at destroy() method.
              >
              >Iam uptaing the connction from the datasource .when i initiate the graceful
              >shutdown
              >on the
              >weblogic 7.1 container suspends the JMS and immdeately it suspends the
              >JDBC Service.
              >At this moment
              >the servlet holds the connection,It started to throw following sqlexception
              >
              >
              >workerthread:java.sql.SQLException: Connection has been administratively
              >disabled.
              >Try later.
              >
              >How do i make the container to call the servlet destroy method before
              >it
              >releases/disables the connection pool.Any help in resolving this issue
              >is highly
              >appreciated.
              >
              >
              >
              >
              

Maybe you are looking for

  • Memory cooling, good or not

    Hy there, have read several topics about cooling your memory for better performance. Some guys said is better other better no cooling on your memory. Now my question is, see sig. I have 2 modules of apacer in slot 1 & 2 System works fine but still fr

  • Can I install Linux and then use the original Windows 8 OEM product key for a virtual machine on the same computer?

    I have ordered a new laptop and expect to receive it in 2-3 weeks.  The laptop comes with an OEM version of Windows 8 installed.  I wish to install Linux as the host operating system and create a virtual machine running Windows 8.  Can I legally use

  • Reg utl_file

    Hi, i am new to this concept to these packages. The packages names are UTL_FILE, UTL_HTTP, UTL_SMTP and UTL_TCP i have an issue from one of my clients that according to audit these should not be given public privileges to access and should be given t

  • Material Group - Price

    Hi Friends, I have made some Material Groups which i want to use it in Service Order. I have assign Material Group to GL Account. My Problem is  while making Service Order Price should be come Automatecally.  Please tel me how & where do i maintain P

  • Display open connection from logs ( 5.2 Patch 6 )

    Hi, I am running DS 5.2 and would like to know if there is any way we could get open search/mod/del operation. I do have lgrep command, but not sure if could utilize that get i want intend to. There is SAM application sitting against LDAP, and i woul