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.
Similar Messages
-
Difference between session and connection
Not sure this is the right place for this, but I am not able to find a proper definition between these 2 terms.
What is the difference between session and connection, theoritically speaking ?Hello
In order to get the meaning of terms Connection and Session let's define first the term Flow.
The definition of a Flow is historically accepted as:
A unidirectional sequence of packets between 2 network endpoints that have the following 7 things in common:
1. Source IP address
2. Destination IP address
3. L3 Protocol type
4. Source port
5. Destination port
6. Tos (Type of Service)
7. Input interface
The terms Connection and Session can have many different meanings depending on the framework that they are used, but it can be said that:
Connection: A bidirectional Flow
Session: Many connections between the same source and same destination
HTH -
Difference between OraclePooledConnection and Connection
Hi,
Can someone help me in finding the difference between using oracle.jdbc.pool.OracleConnectionPoolDataSource with OraclePooledConnection and oracle.jdbc.pool.OracleConnectionPoolDataSource with Connection.
Thanks in advance.
Sindhiya V.Hello
In order to get the meaning of terms Connection and Session let's define first the term Flow.
The definition of a Flow is historically accepted as:
A unidirectional sequence of packets between 2 network endpoints that have the following 7 things in common:
1. Source IP address
2. Destination IP address
3. L3 Protocol type
4. Source port
5. Destination port
6. Tos (Type of Service)
7. Input interface
The terms Connection and Session can have many different meanings depending on the framework that they are used, but it can be said that:
Connection: A bidirectional Flow
Session: Many connections between the same source and same destination
HTH -
What's the difference between using a connection pool and a datasource
Howdy. I figure this is a newbie question, but I can't seem to find an
answer.
In the docs at bea, the datasource docs say
"DataSource objects provide a way for JDBC clients to obtain a DBMS
connection. A DataSource is an interface between the client program and the
connection pool. Each data source requires a separate DataSource object,
which may be implemented as a DataSource class that supports either
connection pooling or distributed transactions."
In there it says the datasource uses the connection pool, but other than
that, what is the difference between a connection pool and a datasource?Thanks for the info. I think it makes some sense. But it's a bit greek.
I'm sure it'll make more sense the more I work with it. Thanks.
"Chuck Nelson" <[email protected]> wrote in message
news:3dcac1f5$[email protected]..
>
Peter,
Here is a more formal definition of a DataSource from the Sun site
"A factory for connections to the physical data source that thisDataSource object
represents. An alternative to the DriverManager facility, a DataSourceobject
is the preferred means of getting a connection. An object that implementsthe
DataSource interface will typically be registered with a naming servicebased
on the JavaTM Naming and Directory (JNDI) API.
The DataSource interface is implemented by a driver vendor. There arethree types
of implementations:
Basic implementation -- produces a standard Connection object
Connection pooling implementation -- produces a Connection object thatwill automatically
participate in connection pooling. This implementation works with amiddle-tier
connection pooling manager.
Distributed transaction implementation -- produces a Connection objectthat may
be used for distributed transactions and almost always participates inconnection
pooling. This implementation works with a middle-tier transaction managerand
almost always with a connection pooling manager.
Does that help clarify the distinction?
Chuck Nelson
DRE
BEA Technical Support -
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 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 -
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?
KenKen 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. -
Difference between closing the connection before and after committing user transaction?
I was wondering what's the difference between closing the connection before committing
the transaction versus closing the connection after committing the transaction?...
for e.g....
Scenario 1.........
UserTransaction useretran;
usertran.begin();
Connection con = datasource.getCOnnection();
// do bunch of stuff...
conn.close();
usertran.commit()
Scenario 2...
UserTransaction useretran;
usertran.begin();
Connection con = datasource.getCOnnection();
// do bunch of stuff...
usertran.commit()
conn.close();
thanks....
Srini
Hi. As long as you're sure there's a transaction going on, and the connection
is a transaction-aware object (from a TxDataSource), either will be fine.
In the first scenario the actual semantics of the close() call are less than
normal, because we really don't close the connection or return it to the
pool until the actual transaction commits, and in the second case, we have
already taken the connection out of your service as of the commit().
The second scenario is the usual coding style. If there's ever a chance your
code will get non-transaction-aware connections, it is crucial to close
connections, and I always recommend putting the close() in a finally block
so it's guaranteed to happen.
Joe
srinivas wrote:
I was wondering what's the difference between closing the connection before committing
the transaction versus closing the connection after committing the transaction?...
for e.g....
Scenario 1......... UserTransaction useretran; usertran.begin(); Connection con =
datasource.getCOnnection(); // do bunch of stuff... conn.close(); usertran.commit()
Scenario 2... UserTransaction useretran; usertran.begin(); Connection con = datasource.getCOnnection();
// do bunch of stuff... usertran.commit() conn.close();
thanks....
Srini -
Difference between poh and pov in module pool programming
hi all,
pls tell me difference between poh and pov and how i check validation in screenHi,
POV gives you F4 help.
like:
You can call dialog modules in the POV event using the event keyword PROCESS ON VALUE-REQUEST.
PROCESS ON VALUE-REQUEST.
FIELD f MODULE mod.
After the PROCESS ON VALUE-REQUEST statement, you can only use the MODULE statement together with the FIELD statement. When the user chooses F4 for a field f, the system calls the module mod belonging to the FIELD statement. If there is more than one FIELD statement for the same field f, only the first is executed. The module mod is defined in the ABAP program like a normal PAI module. However, the contents of the screen field f are not available, since it is not transported by the FIELD statement during the PROCESS ON HELP-REQUEST event. You can now program your own value lists in the module. However, this procedure is only recommended if it really is not possible to use a search help. Defining search helps is much easier than PROCESS ON VALUE-REQUEST, since the system takes over some of the standard operations, such as getting field contents from the screen. It also ensures that the F4 help has a uniform look and feel throughout the system. Furthermore, it means that you do not have to reassign input help to fields on each screen.
Despite the introduction of search helps (and search help exits), there are still cases in which you need to use parts of the standard F4 functions directly. In this case, there are some standard function modules that you can use in the POV event. They support search helps, as well as all other kinds of input help, and are responsible for data transport between the screen and the input help. These alll have the prefix F4IF_. The most important are:
· F4IF_FIELD_VALUE_REQUEST
Calls the input help of the ABAP Dictionary dynamically. You can pass the component names of a structure or database table of the ABAP Dictionary to the function module in the import parameters TABNAME and FIELDNAME. The function module starts the ABAP Dictionary input help for this component. All of the relevant screen fields are read. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the users selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
· F4IF_INT_TABLE_VALUE_REQUEST
This function module displays a value list that you created in an ABAP program. The self-programmed value list is passed to the function module as the table parameter VALUE_TAB. If you specify the import parameters DYNPPROG, DYNPNR, and DYNPROFIELD, the users selection is returned to the corresponding field on the screen. If you specify the table parameter RETURN_TAB, the selection is returned into the table instead.
There are also two function modules - DYNP_VALUES_READ and DYNP_VALUES_UPDATE - that can read the values of screen fields and return values to them during the POV event. For further information, refer to the relevant function module documentation.
Input help in dialog modules
REPORT demo_dynpro_f4_help_module.
TYPES: BEGIN OF values,
carrid TYPE spfli-carrid,
connid TYPE spfli-connid,
END OF values.
DATA: carrier(3) TYPE c,
connection(4) TYPE c.
DATA: progname TYPE sy-repid,
dynnum TYPE sy-dynnr,
dynpro_values TYPE TABLE OF dynpread,
field_value LIKE LINE OF dynpro_values,
values_tab TYPE TABLE OF values.
CALL SCREEN 100.
MODULE init OUTPUT.
progname = sy-repid.
dynnum = sy-dynnr.
CLEAR: field_value, dynpro_values.
field_value-fieldname = 'CARRIER'.
APPEND field_value TO dynpro_values.
ENDMODULE.
MODULE cancel INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE value_carrier INPUT.
CALL FUNCTION 'F4IF_FIELD_VALUE_REQUEST'
EXPORTING
tabname = 'DEMOF4HELP'
fieldname = 'CARRIER1'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CARRIER'.
ENDMODULE.
MODULE value_connection INPUT.
CALL FUNCTION 'DYNP_VALUES_READ'
EXPORTING
dyname = progname
dynumb = dynnum
translate_to_upper = 'X'
TABLES
dynpfields = dynpro_values.
READ TABLE dynpro_values INDEX 1 INTO field_value.
SELECT carrid connid
FROM spfli
INTO CORRESPONDING FIELDS OF TABLE values_tab
WHERE carrid = field_value-fieldvalue.
CALL FUNCTION 'F4IF_INT_TABLE_VALUE_REQUEST'
EXPORTING
retfield = 'CONNID'
dynpprog = progname
dynpnr = dynnum
dynprofield = 'CONNECTION'
value_org = 'S'
TABLES
value_tab = values_tab.
ENDMODULE.
*POH gives you F1 documentation:*
like:
If data element supplement documentation is insufficient for your requirements, or you want to display help for program fields that you have not copied from the ABAP Dictionary, you can call dialog modules in the POH event:
PROCESS ON HELP-REQUEST.
FIELD is defined in the ABAP program like a normal PAI module. The processing logic of the module must ensure that adequate help is displayed for the field in question. Instead of calling an extra screen with text fields, you should use one of the following function modules to display a suitable SAPscript document:
HELP_OBJECT_SHOW_FOR_FIELD
This function module displays the data element documentation for components of any structure or database table from the ABAP Dictionary. You pass the name of the component and structure or table to the import parameters FIELD and TABLE.
HELP_OBJECT_SHOW
Use this function module to display any SAPscript document. You must pass the document class (for example, TX for general texts, DE for data element documentation) and the name of the document to the import parameters DOKCLASS and DOKNAME. For technical reasons, you must also pass an empty internal table with the line type TLINE to the tables parameter of the function module.
For further information about how to create SAPscript documents, refer to the Documentation of System Objects documentation.
Field help on screens.
REPORT DEMO_DYNPRO_F1_HELP.
DATA: TEXT(30),
VAR(4),
INT TYPE I,
LINKS TYPE TABLE OF TLINE,
FIELD3, FIELD4.
TABLES DEMOF1HELP.
TEXT = TEXT-001.
CALL SCREEN 100.
MODULE CANCEL INPUT.
LEAVE PROGRAM.
ENDMODULE.
MODULE F1_HELP_FIELD2 INPUT.
INT = INT + 1.
CASE INT.
WHEN 1.
VAR = '0100'.
WHEN 2.
VAR = '0200'.
INT = 0.
ENDCASE.
ENDMODULE.
MODULE F1_HELP_FIELD3 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW_FOR_FIELD'
EXPORTING
DOKLANGU = SY-LANGU
DOKTITLE = TEXT-002
CALLED_FOR_TAB = 'DEMOF1HELP'
CALLED_FOR_FIELD = 'FIELD1'.
ENDMODULE.
MODULE F1_HELP_FIELD4 INPUT.
CALL FUNCTION 'HELP_OBJECT_SHOW'
EXPORTING
DOKCLASS = 'TX'
DOKLANGU = SY-LANGU
DOKNAME = 'DEMO_FOR_F1_HELP'
DOKTITLE = TEXT-003
TABLES
LINKS = LINKS.
ENDMODULE.
Regards,
Renjith Michael -
Difference between passive and active data connection mode for FTP
Hi,
Does any body have the idea of passive and active data connection mode for the transport protocol FTP.
I have one server with FTP, I have to pick the data from this FTP to XI.
What is the difference between active and passive data connection? Does XI supports both the connections?
Thanks & Regards
Katta Mohan ReddyHi
According to SAP Note - 821267
Q: Does the File Adapter support active data connections when connecting to an FTP server?
A: Up to and including SP14, the File Adapter exclusively uses passive data connections. Starting with SP15, active connections will be available.
Difference between active and passive,
You can definitely refer to the site mentioned by Suraj
cheers
Sameer -
What is the difference between HTTPS URL connection and SSLSocket conn
What is the difference between HTTPS URL connection and SSLSocket connection
The difference is that they are different protocols, or rather one protocol layered over the other. If you're within a LAN you will use SSL, if it's a Web service you will use HTTPS.
-
What is the difference between BO Designer connect BW QUERY and BW CUBEuFF1F
HI friend,
What is the difference between BO Designer connect BW QUERY and BW CUBE?
which one is better?
Best regards.
HowardHi Howard,
You can use autorization variables in SAP BW and maitain the security there, using that you can apply diferent security not only at Infoobject levet you can apply security per BEX Query.
Here is some informaion about BEX and SAP BusinessObjects
BI metadata feature _______SAP OLAP BAPI support level
Characteristics (incl. Time and Unit)_______ InfoCube/BEx Query
Hierarchies_______ InfoCube/BEx Query
Basic Key Figures_______ InfoCube/BEx Query
Navigational Attributes_______ BEx Query only
Display Attributes_______ InfoCube/BEx Query
Calculated Key Figures / Formulas_______ BEx Query only
Restricted Key Figures_______ BEx Query only
Custom Structures_______ BEx Query only
Variables_______ BEx Query only
I hope this help you.
BEst regards,
Fede -
Hey just wanted to know what is the reason i would connect my external hardrive to the extreme and what is the difference between LAN and WAN ehternet. I know one is local and other is wide but can someone explain in simpler terms.
Connecting a hard drive to the Airport Extreme makes it available to be shared across all the computers on your network.
WAN (Wide Area Network) is your connection to the internet
LAN (Local Area Network) is your internal (or local) ethernet connections (computers, printers, etc...)
AirPort Base Station: About the WAN and LAN Ports -
Difference between Terminal server connection and MSTSC remote desktop connection
Hi everyone , Wats the main difference between Terminal server connection and MSTSC remote desktop connection? Well both are used to connect a server remotely. right!
Are there any much difference between them?RDP is a protocol and MSTSC is the RDP client.
In the situation you are referring to, you use MSTSC (RDP Client) in both cases, but when you connect to a client PC (Windows 7, Windows XP, etc) you can only connect if nobody is using that PC at the moment, if you connect to a server you can work along with
some other users. Server OS supports 2 connections by default, if you want more people you need Remote Desktop Services and RDS licenses.
Thanks,
сила в справедливости -
What is the difference between OEE and OSE
What is the difference b/w
Oracle8i Enterprise Edition and Oracle8i Standard Edition?
Which version I choose to install the Oracle Server?The real difference between one and the another one are the options installed in the database. I have a document where you can see in detail what options have one and what options have the another one.
Which version I choose to install the Oracle Server?
r.- That is quite related to what options you need for your applications. Options like : partitioning, etc.
With this view you can see what options are available in your database.
SQL> select * from v$option;
PARAMETER VALUE
Partitioning TRUE
Objects TRUE
Real Application Clusters FALSE
Advanced replication TRUE
Bit-mapped indexes TRUE
Connection multiplexing TRUE
Connection pooling TRUE
Database queuing TRUE
Incremental backup and recover TRUE
y
PARAMETER VALUE
Instead-of triggers TRUE
Parallel backup and recovery TRUE
Parallel execution TRUE
Parallel load TRUE
Point-in-time tablespace recov TRUE
ery
Fine-grained access control TRUE
Proxy authentication/authoriza TRUE
tion
PARAMETER VALUE
Change Data Capture TRUE
Plan Stability TRUE
Online Index Build TRUE
Coalesce Index TRUE
Managed Standby TRUE
Materialized view rewrite TRUE
Materialized view warehouse re TRUE
fresh
Database resource manager TRUE
Spatial TRUE
PARAMETER VALUE
Visual Information Retrieval TRUE
Export transportable tablespac TRUE
es
Transparent Application Failov TRUE
er
Fast-Start Fault Recovery TRUE
Sample Scan TRUE
Duplexed backups TRUE
Java TRUE
PARAMETER VALUE
OLAP Window Functions TRUE
Block Media Recovery TRUE
Fine-grained Auditing TRUE
Application Role TRUE
Enterprise User Security TRUE
Oracle Data Guard TRUE
Oracle Label Security FALSE
OLAP TRUE
Heap segment compression TRUE
Join index TRUE
Trial Recovery TRUE
PARAMETER VALUE
Oracle Data Mining TRUE
Online Redefinition TRUE
Streams TRUE
Very Large Memory TRUE
File Mapping TRUE
48 rows selected.
SQL>
Joel P�rez
Maybe you are looking for
-
Anyone know what is this?
Interval Since Last Panic Report: 44248 sec Panics Since Last Report: 4 Anonymous UUID: D73EBFEF-1FC1-462E-B11A-2A3968232F71 Sun Sep 2 16:31:30 2012 panic(cpu 0 caller 0xffffff7f80918947): NVRM[0/1:0:0]: Read Error 0x000
-
"Description" and "Email" user properties?
I've noticed that there are a lot of things you can do in the API that you can't do through the other interfaces. For example, you can disable all non-supervisor logins, which is cool.<BR><BR>Looking through the "ESB_USERINFO_T" structure, I noticed
-
Send purchase order e-mail with release strategy
Hi!! I have a problem with sending e-mails in purchase order that are blocked with release strategy. I create a purchase order that is block for the release strategy, then I release it. This is working OK, but I can't send an e-mail with this release
-
When will Oracle have an application available for the Linux desktop? The current apps require JInitiator which is Windows only.
-
Can anyone help me with the commands to import and restore backup from another administrative server
Dear all. Can anyone help me with the commands to import and restore backup from another administrative server