on 09-06-2010 11:03 AM
Iam using sapJCO3. I have a java application which runs on JBoss AS. the application connects to SAP system and fetches data. If i deploy my application in the jboss server for the first time it works fine. If I try to redeploy the applicationusing the hot deployment property(my jboss server is running while i re deploy) and try to use the application it gives me error as follows
Caused by: java.lang.IllegalStateException: DestinationDataProvider already regi
stered org.hibersap.execution.jco.JCoDataProvider
at com.sap.conn.jco.rt.RuntimeEnvironment.setDestinationDataProvider
I want to know if there is any way that I can get current instance of DataDestinationProvider and degerister it.
Please respond its critical.
I havnt' used Jboss, But in Netweaver Application Server, If we faced such problem we use to quickly login to
SAP J2EE Engine Administration, there under deployments we browse our application, right click on it and just deactivate it !
Try to find out your J2EE Engine Adminstration Console, there you will find all deployments.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You cannot get the instance of the currently registered DestinationDataProvider. You then would be able to deregister any other provider which is of course not allowed. You are only allowed to deregister your own instance and if it is yours, it should not be that hard to get this object from your own coding.
In general, if you are running within a multi-application environment, you never should bundle the providers with your business application but split this into several parts. Otherwise only the first application being deployed this way will win.
I agree with Stefan Gass.
SAP JCA Adapter would solve these kind of issues as Adapter is deployed once and multiple application can be deployed and/or redeployed. SAP WAS has its own JCA adapter which can be used and for non SAP App server there is open source version available.
Another solution would be to use Link: [javax.servlet.ServletContextListener(contextDestroyed)|http://download.oracle.com/javaee/5/api/javax/servlet/ServletContextListener.html] to unregister DataDestinationProvider. Maybe HiberSAP needs to consider this.
I feel first approach with JCA is lot more cleaner and flexible.
User | Count |
---|---|
84 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
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.