cancel
Showing results for 
Search instead for 
Did you mean: 

ApplicationServiceContext

Former Member
0 Kudos

Hi,

i m customizing my application using classes from WEB AS.

I want to create a "servicecontext" from ApplicationServiceContext and want to paas it to the start() of ApplicationServiceFrame interface which i m implementing.

can any one help me.I m stuck with it for a very long time.

Follwoing is class that i have created.

package com.sap.engine.services.dbpool.deploy;

import java.rmi.RemoteException;

import java.util.Properties;

import com.sap.engine.frame.ApplicationFrameAdaptor;

import com.sap.engine.frame.ApplicationServiceContext;

import com.sap.engine.frame.ApplicationServiceFrame;

import com.sap.engine.frame.ServiceException;

import com.sap.engine.frame.ServiceRuntimeException;

import com.sap.engine.services.deploy.DeployService;

import com.sap.engine.services.monitor.server.MonitorServerFrame;

import com.sap.engine.frame.ApplicationFrameAdaptor;

import com.sap.engine.services.dbpool.PoolFrame;

/**

  • @author M1002023

*

  • To change the template for this generated type comment go to

  • Window>Preferences>Java>Code Generation>Code and Comments

*/

public class CreateDS implements ApplicationServiceFrame{

public static void main(String[] args) throws RemoteException

{

ApplicationServiceContext serviceContext;

CreateDS ds= new CreateDS();

try

{

ds.start(????<<serviceContext>>????);

}

catch(ServiceException ex)

{

}

}

public void start(ApplicationServiceContext serviceContext)

throws ServiceException

{

String applicationName="sap.com";

final com.sap.engine.services.dbpool.deploy.JDBCDescriptor sysDSDescr=new JDBCDescriptor();

int logDebug = 100;

String APP_NAME = "DBInitProcess";

String ROOT_CFG_NAME = "dbpool";

String DRV_HT_NAME = "drv";

String DBINIT_HT_NAME = "dbInit";

sysDSDescr.setDataSourceName("saurabh");

sysDSDescr.setDriverName("mysql");

sysDSDescr.setDriverClassName("org.gjt.mm.mysqlDriver");

sysDSDescr.setURL("jdbc:mysql://127.0.0.1/wise");

sysDSDescr.setPassword("");

sysDSDescr.setUsername("root");

sysDSDescr.setSQLEngine("Vendor SQL");

System.out.println(sysDSDescr.getDataSourceName());

System.out.println(sysDSDescr.getDriverClassName());

System.out.println(sysDSDescr.getDriverName());

System.out.println(sysDSDescr.getURL());

System.out.println(sysDSDescr.getUsername());

try

{

DataSourceManagerImpl dsm= new DataSourceManagerImpl(serviceContext,sysDSDescr);

dsm.createDataSource(applicationName,sysDSDescr);

}

catch(RemoteException rex)

{

}

}

public void stop() {

}

}

Can some help pls

Regards

saurabh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I might let you down with this reply, but.. I'm afraid this would not be possible. The ApplicationServiceContext (and actually all other APIs in the com.sap.engine.frame.*) are used for services development (i.e. J2EE Engine services communicate to the core using those APIs). however, development of custom services (which is what you are practically trying to do) is not supported as stated by SAP Note 822542. As this note also suggests, you should contact SAP support (through opening an OSS message) in case you need new service functionality, etc.

Regards,

Ivo

Former Member
0 Kudos

Hi Ivaylo,

Thank you for ur reply.I have been dealing with this problem for more than 2 weeks and still didnt get any clue as to wht to do.

As per your mail we can not create a custom service buti think the actual code for the Deployement tool which is in Admin.jar should be having some code where the object of ApplicationServiceContext must be getting created becasue they are passing it in most of the methods in the files that i have seen from Admin.jar.

Could u pls help me and tell me which file its being done in.Also could u tell me if there is a documentation available on this topic somewhere.

Regards

saurabh

Answers (1)

Answers (1)

Former Member
0 Kudos

What jar file contains com.sap.engine.frame.* ?