DataSource without a Pool?

Can I use a DataSource without a pool? I can't use a pool because the
username/password is user-specific, but I'd like the login timeout that the
DataSource provides.
Thanks,
Bob

Can't use DriverManager. It has synchronization problems and deadlocks under
heavy loads. :( It's a known issue to which the solution is to either use
the Driver directly or a DataSource. Driver does not have setLoginTimeout(),
but DataSource does, so I thought I'd try the DataSource route rather than
rolling my own Connection timeout-managing Thread.
Bob
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
>
============================================================================
=
DriverManager.setLoginTimeout
public static void setLoginTimeout(int seconds)
Sets the maximum time in seconds that a driver will wait while attemptingto
connect to a database.
Parameters:
seconds - the login time limit in seconds
============================================================================
==
There are some problems associated with using driver manager though.
You could search for "DriverManager" in this news group to find
more. http://search.bea.com/weblogic/gonews
Slava
"Bob Lee" <[email protected]> wrote in message
news:[email protected]...
It's not something I have control over. The data is highly sensitive and
user-level security is implemented at the database level. No way aroundit.
The question is, how do I set a login timeout on connecting to thedatabase
so that I can fail over to a backup database in a timely manner?
Thanks,
Bob
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
Hi Bob,
Getting a connection is a pretty expensive operation,
Using connection pool does reduce time necessary to
get a connection. This is what the pools are.
The open question is how to handle different access
right. I'd create a report user that is capable of accessing
data required for all reports. If it's a serverside app, actual
users won't be able to access DB directly anyways.
Slava
"Bob Lee" <[email protected]> wrote in message
news:[email protected]...
My goal is to find a way to reduce the timeout time for making aconnection.
I'm not sure using a dynamic pool would facilitate this.
Bob
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
Bob Lee wrote:
Transaction control is not required. This is simply a query and
report
application. Can you point me in the right direction to
implement
these
dynamic pools?It's in our docs, under dynamic pool API.
Is it plausible to create/destroy a pool within an HTTP
request context?Well, if you have confidence that the pool will likely be re-used.
it
would
be good to make them when they're needed and not there yet. I
would
try to synchronize the code that tested/made the pool, to avoidtwo
threads trying to make the same-named pool...
Joe
Thanks,
Bob
"Joseph Weinstein" <[email protected]> wrote in message
news:[email protected]...
Have you considered a pool per user, with only one connection?
You can have as many pools as you want, and the dynamic pool
API will allow you to create and destroy pools in a running
server.
Do you require weblogic transactional control?
Joe
Bob Lee wrote:
The data we are accessing has user-level permissions
implemented
in
the
database. :(
I guess I could implement a connection timeout thread that
could
manually
interrupt connections. Do you have a better suggestion?
Thanks,
Bob
"Slava Imeshev" <[email protected]> wrote in message
news:[email protected]...
Hi Bob,
DataSource can not be used without a connection pool.
In fact, DS is just a standard facade for a connection
producing
facility, which is a connection pool in case of weblogic.
BTW, why would you need to have different loginnames/passwords
for a serverside application?
Regards,
Slava Imeshev
"Bob Lee" <[email protected]> wrote in message
news:[email protected]...
Can I use a DataSource without a pool? I can't use a
pool
because
the
username/password is user-specific, but I'd like the
login
timeout
that
the
DataSource provides.
Thanks,
Bob

Similar Messages

  • DataSource Vs Connection Pooling

    What is the difference between Datasource and Connection Pool, and what is the advantages of using both.can any one plz explain me..

    Hi,
    Without creating a Connection Pool, one can not create a Data Source.
    Connection Pool refers to the DataBase URL, Driver Class, User-Id and Password for the database.
    Data Source refers to the Connection Pool created above for the particular database.
    And to get connection from the DataSource:
    DataSource ds = (javax.sql.DataSource)initCtx.lookup("JNDI-NAME");
    Connection conn = ds.getConnection();
    sameer

  • How to list the datasources without use a tnsnames.ora file?

    Hi,
    I want to use the OracleDataSourceEnumerator class of ODP.Net to list the datasources on which the user can connect.
    It's work with a tnsnames.ora on the local station, so good.
    But I want use the easy connect naming methode so i have edited the sqlnet.ora file with this:
    NAMES.DIRECTORY_PATH= (EZCONNECT, TNSNAMES)
    then i have deleted the content of the tnsnames.ora
    so my code don't work : none datasource is returned by the OracleDataSourceEnumerator
    So my question : is it a way to list the datasources without use a tnsnames.ora file?
    Edited by: user13499556 on 17 déc. 2010 08:21

    You can check
    DataConnectionFile.EnumerateDependants method
    This post is my own opinion and does not necessarily reflect the opinion or view of Slalom.

  • Dynamic datasources and connnection pools cont...

    sorry.. i got an error when replying to the original message..
    Thanks for the quick response. I'm assuming this applies to datasources as well. So, there's not much WL overhead with creating hundreds datasources and connection pools up front?
    Ken

    Ken Yeung wrote:
    sorry.. i got an error when replying to the original message..
    Thanks for the quick response. I'm assuming this applies to datasources as well. So, there's not much WL overhead with creating hundreds datasources and connection pools up front?
    Kencorrect.

  • How to run setup for new datasources without breaking old datasources?

    Hi,
    I am wondering how to install some more data sources (2LIS_05_Q0NOTIF, 2LIS_17_10NOTIF and 2LIS_18_10NOTIF) without breaking the delta mechanism for other data sources when I start to use the new datasources.
    I have installed some QM cubes (0QM_C04, -05, -08 and -11) and delta loads run every night.  Now I want to add two more cubes (0QM_C02 and -03). The new cubes use datasources that are not yet available.
    If I now activate the needed datasources, delete the content of the setup tables again and run 'Application-Specific Setup of Statistical Data' for 'Quality Management', 'Plant Maintenance' and 'Service Management', I am afraid that I will re-initialize the delta queue for the datasources that are already in use... In other words: I am afraid of breaking all datasources in application 05, 17 and 18...
    I cannot find documentation addressing this problem. Any input, anyone?
    Best regards,
    Christian Frier

    Hi all,
    if I understand you all correctly, I can use the following plan:
    0) Wait until no documents are posted on the R/3 side.
    1) Run the delta loads and check that the queues are empty (RSA7 and LBWQ).
    2) Delete the setup tables.
    3) Run the 'Application-Specific Setup of Statistical Data'
    4) Create and execute infopackages for initial dataload (for the new datasources).
    5) Create and execute infopackages for delta loads      (for the new datasources).
    6) Run the infopackages for delta load from the 'old' datasources without running a new initial dataload.
    So basically 6) is the step I worry about.
    That is that I can start to use 2LIS_05_ITEM, 2LIS_17_ITEM and 2LIS_18_ITEM without breaking the delta sequence for 2LIS_05_TASK, 2LIS_17_TASK and 2LIS_18_TASK.
    regards,
    Christian

  • Difference between Datasource and Connection Pool

    Hi,
    What is the major difference between Datasource and Connection Pool.
    Both the Datasource with JNDI and Connectio Pool will serve the pool of connections. Then what is the difference.
    regards,
    Raj

    A datasource is not implicitly a connection pool. You can configure that in the datasource properties. A connection pool is also not implicitly a datasource. You can create your own connection pool using the java.sql interfaces. A datasource just gives the ability to acquire the connections and access the database through JNDI. A connection pool just gives the ability to reuse a set of connections which are created/closed/controlled by the connection pool logic.

  • Migrating from WebLogic v8.1.3 to v10.3:  Datasources and Connection Pools

    I took the liberty to migrate my OLD BEA WebLogic v8.1.3 domain (i.e. sample) to Oracle WebLogic v10.3. Everything appears to run smoothly BUT when I try to connect to the Hypersonic Database I had from the OLD environment, I get connection errors (i.e. weblogic.common.ResourceException). I can see from the NEW 10.3 environment that the migration utility creates two (2) datasources (sampleDS and samplePool). However, when clicking through the screens, I do not see how sampleDS refers to the samplePool out of the box from the migration utility. When I start the WebLogic domain with startWebLogic.cmd...here is the code to launch the actual DB instance:
    cd hsqldb
    start "Sample DB (HSQLDB)" %JAVA_HOME%\bin\java -classpath hsqldb.jar -Xms32m -Xmx128m org.hsqldb.Server -database sampleDB -port 15553 -silent false -trace false
    cd ..
    This works quite well and launches a window that has the following:
    | Sample DB (HSQLDB)
    | server.properties not found, using command line or default properties
    | Opening database: sampleDB
    | server.port =15553
    | server.database =sampleDB
    | server.silent =false
    | HSQLDB server 1.7.1 is running
    | Use SHUTDOWN to close normally, Use [CTRL] + [C] to abort abruptly
    | Wed Jun 16 10:18:48 EDT 2010 Listening for connections ...
    |_________________________________________________________
    This is the right screen and confirms my database is up and running and waiting for connections. Somehow, when I migrated from 8.1 to 10.3 something is not configured correctly and my sampleDS is not properly leveraging the samplePool. Can anyone shed any light on this problem?
    I have went through most of the posts and can not seem to understand what happens to the DS and Pools during the migration and specifically how do I reconnect the two to ensure that I can connect to the database. The app is up and running fine in WebLogic v10.3 but without the dB connection, I am stuck at the login screen.
    Thanks for any help...

    I took the liberty to migrate my OLD BEA WebLogic v8.1.3 domain (i.e. sample) to Oracle WebLogic v10.3. Everything appears to run smoothly BUT when I try to connect to the Hypersonic Database I had from the OLD environment, I get connection errors (i.e. weblogic.common.ResourceException). I can see from the NEW 10.3 environment that the migration utility creates two (2) datasources (sampleDS and samplePool). However, when clicking through the screens, I do not see how sampleDS refers to the samplePool out of the box from the migration utility. When I start the WebLogic domain with startWebLogic.cmd...here is the code to launch the actual DB instance:
    cd hsqldb
    start "Sample DB (HSQLDB)" %JAVA_HOME%\bin\java -classpath hsqldb.jar -Xms32m -Xmx128m org.hsqldb.Server -database sampleDB -port 15553 -silent false -trace false
    cd ..
    This works quite well and launches a window that has the following:
    | Sample DB (HSQLDB)
    | server.properties not found, using command line or default properties
    | Opening database: sampleDB
    | server.port =15553
    | server.database =sampleDB
    | server.silent =false
    | HSQLDB server 1.7.1 is running
    | Use SHUTDOWN to close normally, Use [CTRL] + [C] to abort abruptly
    | Wed Jun 16 10:18:48 EDT 2010 Listening for connections ...
    |_________________________________________________________
    This is the right screen and confirms my database is up and running and waiting for connections. Somehow, when I migrated from 8.1 to 10.3 something is not configured correctly and my sampleDS is not properly leveraging the samplePool. Can anyone shed any light on this problem?
    I have went through most of the posts and can not seem to understand what happens to the DS and Pools during the migration and specifically how do I reconnect the two to ensure that I can connect to the database. The app is up and running fine in WebLogic v10.3 but without the dB connection, I am stuck at the login screen.
    Thanks for any help...

  • Datasource without J2EE/JNDI - just J2SE

    I'm writing a small program that work quite well with ResultSet but I would like to add pooling conections and a serialized RowSet, so I would like to replace DriverManager with DataSource.
    But every thing in the doc's drive me to JDNI and J2EE and I don't want to.
    I'm working with J2SE and my appa should be capable to run in very small machines (Pentium 200 MHz, 32MB, 6 GB).
    I don't want to start an JDNI SPI (just like RMI, LDAP or anything else)
    So, can be made javax.sql.Datasource to work without using JNDI?

    Absolutely.
    Like yourself I write non-web/j2ee apps and would like to use the DataSource/ConnectionPoolDataSource interfaces.
    All that a JNDI implementation does is to call a object factory (passing DataSource configuration details like driver,url,logid,password...) which instantiates a DataSource instance, configures it and passes it back to you. Now you can do all that in your code.
    I use Sybases DataSource and am in the process of developing my own Connection pool using Jakarta Pool and the Sybase Pooling classes.
    Heres what I have to do to create a DataSource instance:
    DataSource ds = new SybDataSource();
    ds.setServerName(machine);
    ds.setDatabaseName(database);
    ds.setUser(logid);
    ds.setPassword(password);
    ds.setPortNumber(Integer.parseInt(port));
    return ds;
    Connection c = ds.getConnection();I typically develop Tomcat apps and so to keep my coding techniques similar, I decided to retain JNDI for non-web apps. This involves writing a JNDI SPI, which is no big deal. The benefit is that I have the same configuration techniques (XML files) the same ServiceLocator pattern to get DataSources by name, and the same code in web or non-web apps.
    Dave

  • When is it appropriate to use DataSource (or Connection pooling)?

    Hello all,
    I'm having some design issues with my application and I'm starting to think that maybe using Connection pooling is not suited for my application. I'm using Tomcat 5.5.12 if it's any relevant..
    The architecture of our application looks like this:
    Servlets -> App Helper classes -> DB/Accessor classes
    looks like the three-tier architecture described in this document: http://www.subrahmanyam.com/articles/servlets/ServletIssues.html
    I have read on the Tomcat docs that said that using DataSource is good practice and improves efficiency since it recycles database connections. However, if the accessor/DB classes are not servlets, how can I use the DataSource facility that interacts with Tomcat?
    I would like to know whether it is a good idea to use DataSource in my case and if so, how? (since they are not servlets)
    Thanks in advance :)

    Hi. Thank you for replying.
    In the examples that I've seen that use JNDI for Database access, it seems that DataSource is always used--in other words, JNDI and DataSource always seem to be used together (in Servlets). I have not found a case where JNDI is used by itself to access the Database--perhaps I'm not looking in the right place. Could you point me to some documentation maybe?
    Thanks a lot!

  • How to  create a datasource from a pool table ?

    Hi guys,
    Is there anyone who faced the same problem.
    I need to create an datasource from the table TIV5T to get texts in BW .
    This table is a pool table . When i want to create the DS in RSO2 i got the message :
    Only transparent tables and database views can be extracted
    I try to create a  projection vue, or use the standard vue  : same error.
    Any Idea ??
    Thank you .
    Dinah

    Hi DInah,
    Please go through the following threads.
    Re: How to extract data from a pool table?
    Datasource on Pool Table
    Regards,
    Ravikanth

  • Creating JDBC Datasource without Console

    I am new to WebLogic. Currently, getting up to speed with WebLogic server 10.3. I can create a JDBC pool from the console. Is there a way to create the JDBC pool without using the console? Also, is there a way that we can create the JDBC resource during the deployment of the application via WAR file?
    Thanks in advance.

    please see: Re: Creating JDBC Resource without Console

  • Alv without type-pools statement

    hi experts,
    can we use reuse_alv_list_display, function module in a report......
    without declaring an type-pools: slis. is it possible.
    if yes give me an example.....
    what are all the mandatory requirements for an alv report.............

    Hi ,
      SLIS is basically used to get the various structures and data types which you use in the FM called by the program , so if you want to implement it without SLIS  then you will have to declare all the data types in your program the same way it is declared in SLIS .
    Why are u a hesitant in using the type pool?
    Regards
    Arun

  • How to activate Purchase datasource without deleting setup table for others

    Hi Gurus,
    In developement system purchasing datasources 2LIS_02_HDR, 2LIS_02_ITM and 2LIS_02_SCN are active and deltas are also running for these.
    Now acccording to the requirement We need to activate other datasources as well like 2LIS_02_CGR and SGR .........
    To so this do we have to run the setup table again or any other option is there for this??
    As this step would take lots of time in Production and for this downtime would be required which is not feasible.
    Please suggest some solution.
    Thanks in Advance,
    Uday Shankar.

    Hi,
    We will do the setup (Filling and Deleting) concept based on application component it's not based on DS .S you don't have other way.
    Regards
    Ram.

  • Send XML file to Webservie datasource without XI - Urgent

    Hi,
    Can anyone send me the JAVA or .Net code to send the XML file to Webservice data source.
    I have tested it with Navigator test pagae and it works fine.
    Kindly send me the piece of code to trigger the webservice,since i am not good at JAVA.
    Thanks,
    Arvind

    Adding on to the previous post...Is it necessary to have synchronous messaging using plain HTTP adapter?? Won't asynchronous messaging work...I guess I could be right or wrong 'cos in my case XI does not do the routing to the final destination which is being handled by another tool...XI inmy case just dumps the payload to the 3rd part...
      Guys correct me if I am wrong...
    -Teresa

  • User Level Vs. Application Level Authorization and Authentication for Container Managed Datasources (Oracle Connection Pools)

    Oracle Database Server 9i supports the usage of LABELS to enforce highly granular
    resource access restrictions at the database level independent of the application
    that is accessing it. In order to use this however, the particular user, and
    not just the application, accessing the database must be known. Oracle Application
    Server (Oracle's J2EE product line) solves this by providing the ability to PROXY
    the identity of the application user and creditials (SSL Certs for instance) down
    to the database server.
    I haven't seen a similar ability for BEA Weblogic Server 8.1 which allow the user
    identity and credientials to be PROXIED to the database server. Is this possible?
    Have I missed an important document?
    Thanks for any input,
    Raymond Tiong

    On 3 Feb 2004 12:51:26 -0800, Raymond Tiong <[email protected]> wrote:
    >
    Oracle Database Server 9i supports the usage of LABELS to enforce highly
    granular
    resource access restrictions at the database level independent of the
    application
    that is accessing it. In order to use this however, the particular
    user, and
    not just the application, accessing the database must be known. Oracle
    Application
    Server (Oracle's J2EE product line) solves this by providing the ability
    to PROXY
    the identity of the application user and creditials (SSL Certs for
    instance) down
    to the database server.
    I haven't seen a similar ability for BEA Weblogic Server 8.1 which allow
    the user
    identity and credientials to be PROXIED to the database server. Is this
    possible?
    Have I missed an important document?
    Thanks for any input,
    Raymond Tiong
    I think there is a section in the JDBC documentation for 8.1 which
    describes what it takes to utilize Oracle 9i extension called "Virtual
    Private Database". With this extension, one might be able to proxy the
    callers
    identity to the DB.
    See: http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1103627

Maybe you are looking for