Which Database connectivity is used professionally in JSP/Servlet?

Hi friends,
Can you tell me which type of database connectivity is generally used in professional web-related projects.
I mean to say,
1) Class.forName method or
2) context lookup using JNDI Data Source method.
Also,
I wonder how in shared hosting anybody writes their <Resource> tag inside TomcatRoot\conf\server.xml file.
In my local Tomcat6 i can do that. But, in Live Shared hosting how to handle JNDI Datasource?
---Sujoy

me_sujoy wrote:
Hi friends,
Can you tell me which type of database connectivity is generally used in professional web-related projects.
I mean to say,
1) Class.forName method or
2) context lookup using JNDI Data Source method.By using a connection pool (usually the one provided by the server).
>
Also,
I wonder how in shared hosting anybody writes their <Resource> tag inside TomcatRoot\conf\server.xml file.
In my local Tomcat6 i can do that. But, in Live Shared hosting how to handle JNDI Datasource?Uhm, by using the context.xml. See the documentation for your Tomcat.

Similar Messages

  • How can I know, which RFC connection is used by my query designer ?

    HI,
    I would like to know,
    which RFC connection is used when i launch the query designer or the report designer or the web designer.
    Thanks.
    Guillaume

    Hi,
    Go to TCODE SM59 and see.
    Regards
    Nilesh

  • How to share the same Database Connection when using several Task Flows ?

    Hi All,
    I’m using JDev 11.1.1.3.0.
    I’m developing ADF Fusion Applications (ABC BC, ADF Faces…)
    These applications are deployed on a Weblogic server.
    Each application has only one Application Module.
    All Application Modules have the same connection type defined: JDBC DataSource : jdbc/GCCDS
    It is working fine.
    I’ve also developed Task Flow Applications for small thinks that are reused in multiple main applications.
    Each Task Flow Application has also one Application Module with the same connections type as main applications.
    All these task flows are deployed to JAR file (ADF Library JAR File) and are reused on my main applications. (drag and drop from the Resource Palette to ADF Regions….).
    There are some parameters passed to Task Flows, so that they can filter data depending on which main applications they are called from.
    Everything is working perfectly.
    All my main applications are using more and more task flows. Which is nice for the reusability etc…?
    Only ONE PROBLEM: DATABASE CONNECTIONS.
    Every Task Flows service made a database connection. So one user may have 10 database connections for the same adf page. And when there are 100 users that are working at the same time, it becomes a problem.
    How to share the same database connections for the main applications and all task flows which are used in the main application?
    Best Regards
    Nicolas

    Hi John,
    When I open a ADF Library JAR file of one of my task flow. (gcc_tf_recentSites.jar)
    I can see TF_RecentSitesService.xml and TF_RecentSitesServiceImpl.class in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service folder
    + bc4j.xcfg in gcc_tf_recentSites.jar\mu\gcc\tf\recentSites\model\service\common folder.
    bc4j.xcfg details are
    +<?xml version = '1.0' encoding = 'UTF-8'?>+
    +<BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration">+
    +<AppModuleConfigBag ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<AppModuleConfig DeployPlatform="LOCAL" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model" name="TF_RecentSitesServiceLocal" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService">+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +<Custom JDBCDataSource="jdbc/GCCDS"/>+
    +</AppModuleConfig>+
    +<AppModuleConfig name="TF_RecentSitesServiceShared" ApplicationName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService" DeployPlatform="LOCAL" JDBCName="gccdev" jbo.project="mu.gcc.tf.recentSites.model.TF_RecentSites_Model">+
    +<AM-Pooling jbo.ampool.maxpoolsize="1" jbo.ampool.isuseexclusive="false"/>+
    +<Security AppModuleJndiName="mu.gcc.tf.recentSites.model.service.TF_RecentSitesService"/>+
    +</AppModuleConfig>+
    +</AppModuleConfigBag>+
    +</BC4JConfig>+
    So, it seems that the Application Module is packaged with the task flow....
    Is it normal ?
    Regards
    Nicolas

  • Which database connection

    I use two different databases X and Y with two different application modules and of course connections. When I create a table entity I can't select which connection I want to use, so I see only the schemas from database X. How can I use the other connection?
    Thanks
    Zoltan

    Is the Entity object created from tables?
    The Business Components Project Initialization frame has a
    Connection select list from which a connection previously configured may be selected or a new connection configured.

  • Which database should we use ?

    Hi,
    I am a beginner to J2ME and developing an application for PDA,
    (where OS = palm ).
    in which, I have to manage record of individuals in agroups, so which Database is most suitable.
    thanks

    If you are talking about storing the data locally on the device, then you son't have any choice: you have to use the RMS (Record Management System). This is part of the MIDP API used to store data persistently on the device. You can look at the API documentation, check out the javax.microedition.rms.* package.
    If the data is going to be stored in a real database on a server, then it doesn't really matter (from the MIDP perspective) what database you use, since the client will be accessing it through an http proxy anyways (ASP, JSP, a servlet, a cgi app, etc.), and won't be doing any direct access to the database. In this case you can choose whatever you feel most comfortable with (be it because it's cheaper, better, open-source, you already own a license, etc.).
    shmoove

  • Database connecting problem using iPlanet Server

    hi experts,
    i am new begi to iPlanet server.
    before that i was using JWS2.0.
    simple servlet is working fine in iPlanet.
    when coming to database connectivity, there is error shown as
    "SQLException java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified "
    below is my servlet
    import javax.servlet.*;          
    import javax.servlet.http.*;
    import java.io.*;
    import java.sql.*;
    import java.util.*;
    public class test1 extends HttpServlet
    Connection dbCon;
    Statement stat;
    public void init(ServletConfig config) throws javax.servlet.ServletException
    public void doGet (HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException
    ResultSet rs;
    response.setContentType("text/html");
    PrintWriter out = response.getWriter();
    try
    Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
    dbCon = DriverManager.getConnection("jdbc:odbc:collegeodbc","","");
    stat = dbCon.createStatement();
    rs = stat.executeQuery("select * from degrees");
    rs.next();
    out.println(rs.getString(1));
    rs.close();
    catch(ClassNotFoundException ce)
    out.println("Class Not Found "+ce);
    catch(SQLException se)
    out.println("SQLException "+se);
    public void destroy()
    this same coding with void main() in system working fine.
    still that servlet working fine with JWS2.0 also, but not in iPlanet.
    any idea.
    Plz help experts
    thanks in adv.

    hi,
    yes u can avoid restarting the server after compiling a servlet
    just follow the following instruction
    go to \Netscape\Server4\https-admserv\config\contexts.properties
    and uncomment the following lines
    context.global.reloadInterval=1
    context.global.isModifiedCheckAggressive=true
    and do the same step for the following properties file in
    \Netscape\Server4\https-"ur machine name"\config\contexts.properties
    and u can avoid restarting the server after u compile a servlet

  • Which Database for Educational Use

    Hi @ all,
    I'm not quite sure, which version of Database i´ve to download or use for educational terms.
    What's up with the Licenses, Cost etc.? I´ve just found a little Overview about the different product versions, but i don´t know now exactly which version i can use for free...
    i´ve tried the standard edition, but the Database Control, ask for permission and told me that i´ve to buy a license for use... so???
    Thanks

    Hi,
    After you install Oracle XE, remember to register on the Oracle Database 10g Express forum in order to gain free access :-)
    Oracle Database Express Edition (XE)
    Cheers

  • How to install eclipse and MyEclipse and use it for jsp-servlet-web service

    hi ,
    please help me to install eclipse 3.1 and How to integrate MyEclipse to do jsp-servlet programming and web services.
    please also help me to include application server like tomcat and axis and use that environment in MyEclipse ide.
    please help me.....

    At the time of installation , you can't change SID XE.
    After installation, you can add another service name
    Check following thread for more details
    Re: How to create service on Oracle 10g XE
    - Virag Sharma
    http://virag.sharma.googlepages.com
    http://viragsharma.blogspot.com

  • Using jFreeCharts with JSP-Servlet Web App

    Can someone please help me to get started on using the jFreeCharts in mt JSP Servlet we app? So far I have this in my servlet but I do not know what to do from here.
    protected void doPost(HttpServletRequest arg0, HttpServletResponse arg1) throws ServletException, IOException {
    //          create a dataset...
              double[][] data = new double[][] {
              { 1.0, 4.0, 3.0, 5.0, 5.0, 7.0, 7.0, 8.0 },
              { 5.0, 7.0, 6.0, 8.0, 4.0, 4.0, 2.0, 1.0 },
              { 4.0, 3.0, 2.0, 3.0, 6.0, 3.0, 4.0, 3.0 }
              //DefaultCategoryDataset dataset = new DefaultCategoryDataset(data);
              //return DatasetUtilities.createCategoryDataset("Series ", "Factor ", data);
              CategoryDataset dataset = DatasetUtilities.createCategoryDataset("Series ", "Factor ", data);
              JFreeChart chart = ChartFactory.createBarChart(
         "Bar Chart Demo 2", // chart title
         "Category", // domain axis label
         "Score (%)", // range axis label
         dataset, // data
         PlotOrientation.HORIZONTAL, // orientation
         true, // include legend
         true,
         false
         }

    the JFreeChart documentation has examples doing just that.
    And if you don't know how to get a browser to call some resource from some html you should get a beginner's tutorial to html.

  • Database connection issue using SQLPLUS

    I have a WIN7 Host named DELL-i5 and a WINXP VM named VMXP on VMWARE.
    Now, the host has a Oracle 11g database orders, SID - orders, username - SYSTEM, password - abc123. I have set the listener to be on port 1521 using NETCA.
    The VM has Oracle client 11g.
    The VM is connected as Bridged and host and VM can ping each other.
    Now, when I choose to connect to the database using this command from VM :
    sqlplus SYSTEM/abc123@//DELL-i5:1521/orders
    I get ORA-12170: TNSConenct timeout occurred
    I have tried the following on th Host's SQLPLUS and only this worked
    SYSTEM/abc123@orders
    What do I do ? Thanks
    Edited by: ztech123 on 28-Oct-2010 18:38

    ztech123 wrote:
    I get ORA-12170: TNSConenct timeout occurredFull details of the error from the oerr comand:
    <i>12170, 00000, "TNS:Connect timeout occurred"
    // *Cause:  The server shut down because connection establishment or
    // communication with a client failed to complete within the allotted time
    // interval. This may be a result of network or system delays; or this may
    // indicate that a malicious client is trying to cause a Denial of Service
    // attack on the server.
    // *Action: If the error occurred because of a slow network or system,
    // reconfigure one or all of the parameters SQLNET.INBOUND_CONNECT_TIMEOUT,
    // SQLNET.SEND_TIMEOUT, SQLNET.RECV_TIMEOUT in sqlnet.ora to larger values.
    // If a malicious client is suspected, use the address in sqlnet.log to
    // identify the source and restrict access. Note that logged addresses may
    // not be reliable as they can be forged (e.g. in TCP/IP).</i>
    What do I do ? ThanksYou have tested connectivity via ICMP - so there is a network route between the sender and receiver. However a timeout results when using 1521/tcp for access via SQL*Plus.
    First test connectivity for that port using telnet. On VMXP try the following.
    telnet dell-i5 1521
    Do you get a connection? If not, then it means that despite ICMP reporting connectivity, there is none on 1521/tcp. In that case the culprit could be a firewall.
    If you do get a connection, then try sqlplus next, but without a tnsnames.ora and sqlnet.ora file - e.g.
    sqlnet syste/abc123@"(DESCRIPTION= (ADDRESS= (PROTOCOL=TCP)(HOST=dell-i5)(PORT=1521)) (CONNECT_DATA= (SID=orders) (SERVER=dedicated)))"
    The idea is to keep the number of configuration files and details to a minimum for testing purposes and to isolate the problem.
    Also check basic stuff like netmasks of both the guest and host operating systems, routing tables and so on.

  • Database connectivity without using Class.forName()

    Hi,
    Can anyone please tell how we can connect to a database without in java without using the Class.forName() method , and then how the database driver gets loaded.
    Regards,
    Tanmoy

    Hi,
    I recently wrote code that connects to a database without using Class.forName() in order to be compatible with Microsoft's JVM. I read about it here:
    http://www.idssoftware.com/faq-e.html#E1
    Basically, you create a new Driver object and use its connect method.
    Here's what my particular code ended up being:
    String url = "jdbc:mysql://localhost:3306/test?user=root&password=mypass";
    Driver drv = new org.gjt.mm.mysql.Driver();
    Connection con = drv.connect(url,null);

  • Long term release of CriticaL Patch Updates: which database version to use?

    Hello,
    The company i work for ask me to mak a plan to stay up-to-date with each quarterly released CPU's (Critical patch update)
    We have 11.1.0.7 databases and 11.2.0.2 databases.
    When i look at the latest CPU, docid 1455387.1 , i notice that for each final RDBMS release, a CPU is relased for a very long time, but for recent releases it is not.
    For exampe for release 11.1.7.0 a CPU is relased until July 2015, but for 11.2.0.2 final CPU ends already at January 2013.
    For 10.2.0.5 i noticed the same behaviour.
    This makes me think....
    In my opinion i would never upgrade from 11.1 to release 11.2, until the final 11.2. release come out, if i want to stat up-to-date with the cpu's.
    Am i right?
    And does this mean that if new applications neeed in our company need an 11g daatbase, i better install 11.1.0.7 rather then 11.2?
    (if the application does not need 11.2 funtionality of course)
    Any comment is appreciated.
    Regards,
    Harry

    Pl see support policies on pages 2 thru 4 in this doc - http://www.oracle.com/us/support/library/lifetime-support-technology-069183.pdf. CPU patches are available only during Premier and Extended Support.
    Details are in this MOS Doc
    Lifetime Support and Support Policies - Oracle Database Overview [ID 1351163.1]
    Release and support schedule is published - see this MOS Doc
    Release Schedule of Current Database Releases [ID 742060.1]
    It is always recommended to upgrade to the latest database version available, even if you do not need the features. A possible option is to perform upgrades on a yearly basis to whatever is the latest version available and apply CPUs/PSUs for four quarters until the next upgrade cycle
    HTH
    Srini

  • Configuring database connection (metadata repository) from jsp

    anybody could help me to configuring database connection from portal schema from jsp page.
    i dont have idea.
    Thanks.

    Hi,
    You won't be able to access the DB connections used by iAS from the JSP. As these connections are managed by mod_plsql component in iAS.
    Thanks,
    Ved

  • How many number of database connections used in a transaction

    Hi All,
    We are using weblogic 8.1 with Oracle 9i both running on windows 2000. We are trying to estimate the potential resource usage in the system we are building. As part of this activity we want to find out how the database connections are used for entity beans -
    If a session bean calls more than one entity beans
    (each method in the entity bean doing one update) does weblogic use the same database connection for all the entity beans or does it use seperate connections ? Is such behaviour documented somewhere ?
    Here the assumption is all the entity beans are linked to the same datasource.
    If the (default) behaviour is to use seperate connections is there a way to make it use one connection across multiple entity beans.
    Thanks
    Kingshuk

    Hi Bodapati,
    Sorry for the delay in replying to this.
    There is optimization, which will use the XA
    connections from the pool. Can you tell me what your
    observations are? I may be able to see if we can tune it.From our tests the XA driver too appear to make use of one connection only for the life of the transaction. There is a good document here explaining how it is ensured that only one connection is used - http://e-docs.bea.com/wls/docs81/oracle/trxjdbcx.html#1083132
    Quoting from the above URL :
    When a thread attempts to use a connection, the XA jDriver calls xa_open (and xa_start) to create the connection and associate it with the thread. After the database connection is created, the connection remains associated with the thread; the driver does not call xa_close. When the thread subsequently needs a database connection, it uses the same database connection associated with it, even though it appears to get and return a connection from the JDBC connection pool
    I am not sure why you say the connections will be
    blocked. One connection will be blocked only if you are > using non-XA driver to setup the pool, until the
    transaction commits. For XA there is no need to reserve
    the same connection for the transaction.Probably my understanding on this is incorrect and I need to read up. I was under the impression that - once a transaction begins, each connection used within that transaction, is enlisted as a part of that transaction and can not be used by in another transaction until the transaction commits or rollsback.
    Thanks
    Kingshuk

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

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

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

Maybe you are looking for

  • Creative Media Source/Player & Windows Vi

    Hi?My daughter had to have a new laptop. It runs on Vista 32 bit. I spent considerable time trying?to upgrade to the?latest?firmware for her Creative Zen Touch, which is a requirement for Vista to recognize the player. Finally succeeded, but is was a

  • RAR 5.3 - Logical system

    I've uploaded Function Authorization files directly against system connector and completed the configuration and generated the rules. Now I want to connect another R/3 system to the same GRC box. In this scenario is it possible to make use of logical

  • Apple iTunes store in unsupported countries?

    Is there any way possible to make an iTunes account in a country that currently does not have their own iTunes store? I am planning on buying the new MacBook Air 13", but there seems to be no viable option to legally acquire apps and music from any o

  • Export table:

    Hi,   When i try to use the Export (table) command, an exception comes: I followed the syntax: EXPORT TABLE hotel.room   DATA OUTSTREAM 'room_csv.data' Error - Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed Syntax error or access vio

  • Query about previous days..Help needed

    Hi, I have a scneario in which I want to get the sunday's date for 5 weeks after today's date as expiry date. i.e., If this sunday is '14-Sep-08' expiry date will be '19-Oct-08' (As it is 5 weeks ahead of the present sunday) I am getting this as NEXT