Skip to Content
Author's profile photo Former Member

How to Create and Remove Data Source on SAP WAS J2EE Engine Dynamically through JAVA?

If your question is the title mentioned here then you have landed in the right blog. This blog explains you the features to create and remove data source applications on SAP WAS J2EE Engine.

public void deleteDataSource(String dsName) throws Exception

    {

        DataSourceManager dsm = null;

        try

        {

            dsm = getDataSourceManager();

        }

        catch (NamingException nme)

        {

            System.err.println(“Naming Exception while getting the Data Source

                    Manager”);

            throw new Exception(“Naming Exception while getting the Data

                        Source Manager”);

        }

        try

        {

            dsm.removeApplication(dsName);

        }

        catch (RemoteException re)

        {

            System.err.println(“Remote Exception while removing the data 

                                         Source application”);

            throw new Exception(“Remote Exception while removing the data 

                                         Source application “);

        }

    }

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.