on 03-23-2007 4:34 PM
We are deploying a Java application on Netweaver 2004 SP 18 (clustered with 3 nodes) and 2004s SP 2 (non-clustered). Sometimes it occurs that the corresponding datasource (JDBC with Oracle and MySQL) is not available at startup of our application. The problem is that the datasource is essential at application startup to build indices and so on. The strange on that is that after startup the datasource is available after some minutes.
We have tried two things, according to <a href="http://help.sap.com/saphelp_erp2005vp/helpdata/en/bb/69da54d8aedc419d46d9ea074e4d41/frameset.htm">Creating a DataSource</a>:
- Registering a DataSource in the Visual Administrator
- Deploying DataSource with our Application
Both kinds of configuration show similar problems, occuring sometimes and sometimes not. Are their any possibilities to configure the starting order of our apllication and datasource? Are their dependencies that affect the work of the datasource?
Any help is welcome!
Thanks in advance
Christian
If further problems occur we will post again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Ankur,
we have installed the needed SQL drivers correctly. When configuring the datasource in the VisualAdmin we have tested the functionality by sending some SQL through the debug windows offered there.
Our described problem definitively is not because of the functionality of the datasource; it seems more a problem of loading before our application?!?
Thanks
Christian
Hi to all,
the problem we had seems to be fixed with the following points:
- Defining a "hard" dependency between the database driver and our application in file META-INF/application-j2ee-engine.xml of our deployment. (see <a href="http://help.sap.com/saphelp_nw04s/helpdata/en/28/c9a3a9606f434ea757a3536d220704/frameset.htm">Application References</a>)
- Defining a "hard" dependency between the datasource and our application.
As a result we had to remove the datasoure out of our deployment and configure it manually in the VisualAdmin.
See the following code to define the dependency:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE application-j2ee-engine SYSTEM "application-j2ee-engine.dtd">
<application-j2ee-engine>
<reference reference-type="hard">
<reference-target
provider-name="sap.com"
target-type="library">mysql4-driver</reference-target>
</reference>
<reference reference-type="hard">
<reference-target
provider-name="cosinex.de"
target-type="application">mysql4-datasource</reference-target>
</reference>
<provider-name>cosinex.de</provider-name>
<fail-over-enable mode="disable"/>
</application-j2ee-engine>
We are not finally sure if this fixes our problem of the availability of the datasoure for our application at startup (Servlet Init()), but until now all works fine. We explicitly had no luck with deploying the datasoure together with our application in one EAR file...
User | Count |
---|---|
81 | |
24 | |
11 | |
9 | |
7 | |
5 | |
5 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.