Skip to Content
Once the data source is created on my SAP Web Application Server through my Java application, my next dilemma would be if I can edit the same on SAP WAS through my JAVA application. The answer is a definite YES. The user can edit all the data sources and add data sources to one of the applications in one shot.

Code Sample:

The Java code sample given below is used to edit the Data Sources in a Data Source Application deployed on SAP WAS J2EE Engine. Refer my earlier blogs on Data Source to find how JDBCDescriptor and DataSourceManager are created. Also find the pre-requisites for creating the application in the same blog.

Update Data Source Application:

The user has to prepare the JDBCDescriptors for the particular application to be updated and add them to a Vector. Then the updateDataSourceApplication is called upon by passing the application name and the vector is passed to the method. The user also can give the option to start the data source application. Set the value to true if the application has to be re-started. When the user updates the application the old application is removed and a new one is created.

Note:

1. When the user creates a Data Source application there should be atleast one data source created.
2. When the user wants to add data sources, the JDBCDescriptor of the all the previous created data sources should be made available along with the new one or the new one will replace all the data sources that were initially created on SAP WAS in the particular Data Source Application.

To report this post you need to login first.

Be the first to leave a comment

You must be Logged on to comment or reply to a post.

Leave a Reply