At the end I had to deploy the application to a proper application server. That is: not the embedded OC4J in JDeveloper, but in my case the Oracle 10.1.3.3 application server that runs our SoaSuite.
And I couldn't find a proper document that tells me how to do that. With some searching around, and "with a little help of my friends", I found three documents:
- http://www.oracle.com/technology/obe/obe1013jdev/10131/deployment/deployment.htm
- http://www.pascalalma.net/2008/05/31/oracle-adf-medior-deployment-of-adf-applications-and-using-connection-pools/
- http://download.oracle.com/docs/html/B25947_01/bcservices002.htm#sthref625
But by default JDeveloper ships all your connections in the connection navigator in the model-project's JAR file. And also by default it deploys with a connection-descriptor in the JAR file with the database-connection you used at development time. This is of course not usefull when you deploy the EAR file to a test, acceptance or Production environment. The second post, by Pascal Alma, solves these things.
The last link points to the adf-developers guide where is stated how to change the model-project to use a datasource instead of a fixed JDBC-url.
Below I created a step by step guide to prepare for the proper deployment. For creating the actual deployment profiles I refer to the first link above.
Disable deployment of Jdeveloper Connections.
To disable this feature:
- Go to the jDeveloper Preferences.
- Go to the Deployment node and disable the checkbox “Bundle Default data-sources.xml During Deployment”.
Change Application Module to use Datasources
- Right click on the Application Module and choose Configurations
- Click on the Edit button
- Set Connection Type.
Set connection Type on “JDBC DataSource” and name the Datasource something like jdbc/FDS. - Click on OK.
Now you can create a deployment just following the steps on: http://www.oracle.com/technology/obe/obe1013jdev/10131/deployment/deployment.htm.
Having done that, you can create an EAR file by right-clicking on the deployment profile in the deployment project. And choose EAR-File:
This will create an EAR file in the deploy folder of the project. This file can then be used to deploy to the Application Server. This is quite easily done in the Application Server Control application (http://<applicationserverhost:port>/em). I might write an separate article about that later.
After that you need to create a datasource in the application-server. How to do that is a pretty straightforward task usually done by an Application Server Administrator. But I probably write a separate article about that another time too.
I hope this helps preventing you for searching around as long as I did. If you were searching already for about a day, I'm sorry you did not find me earlier...
No comments:
Post a Comment