I want to write a small application which uses a API (Java class, not JSP or servlet) for database connectivity. A JSP file acts as the client for the API. Since Iam new to weblogic 6.0, I don't know where to write the database info(like driver name, URL, username, pwd etc.,) and how to get those info from the Java API. Could anyone explain me about the process. Also, is there any website for the solution.
Thanks
AJP
-
Where to store Database info in weblogic 6.0 (2 messages)
- Posted by: A JP
- Posted on: December 12 2001 20:39 EST
Threaded Messages (2)
- Where to store Database info in weblogic 6.0 by said aitabaid on December 13 2001 14:24 EST
- Where to store Database info in weblogic 6.0 by Hrishikesh Rane on December 20 2001 14:32 EST
-
Where to store Database info in weblogic 6.0[ Go to top ]
- Posted by: said aitabaid
- Posted on: December 13 2001 14:24 EST
- in response to A JP
how's about xml (kind of config.xml) that will contains your properties, therfiore you can write an api that allows you to retrive these informations and pass them to your jsp.
you can use xerces api for the retrieval operations.
@+ -
Where to store Database info in weblogic 6.0[ Go to top ]
- Posted by: Hrishikesh Rane
- Posted on: December 20 2001 14:32 EST
- in response to A JP
Config.xml is the place to do it
e.g.
Setting up the JDBC Connection pool
<JDBCConnectionPool CapacityIncrement="3"
DriverName="oracle.jdbc.driver.OracleDriver" InitialCapacity="1" LoginDelaySeconds="1" MaxCapacity="5" Name="pool/xxxx" Properties="user=USERNAME;password=PASSWORD;dll=ocijdbc8;server=172.16.xx.xx:1521:prodb;protocol=thin"
RefreshMinutes="15" ShrinkPeriodMinutes="15"
ShrinkingEnabled="true" Targets="myserver"
TestConnectionsOnRelease="true" TestConnectionsOnReserve="true"
TestTableName="dual" URL="jdbc:oracle:thin:@172.16.xx.xx:1521:prodb"/>
Setting up the JDBS Data Source.
<JDBCTxDataSource EnableTwoPhaseCommit="true"
JNDIName="ds/tx/xxxxx" Name="ds/tx/xxxxxxx"
PoolName="pool/xxxxx" Targets="myserver"/>
When u have to get a access do a JNDO lookup on the datasource.
You will get some more information on weblogic edocs\
Regards
Hrishi