Applies To: All JDK
Author(s): Biplab Ray
Company: Tata Consultancy Services
Created on: 13th February 2015
Author Bio:
Biplab Ray is working for Tata Consultancy Services as an Assistant Consultant and development of SAP EP, composite applications using CAF, BPM, BRM, WebDynpro for Java. He also works in technologies like Java/J2EE and has depth understanding on eSOA, Webservice, Enterprise Service, XML.
Requirement:
In many situations, we might require to re-start our server. But to do so, we required SAP Basis support.
Assumption:
AS java should have single server node.
Advantage:
- Clear all the Garbage collection
- Clear all the heap memory
Implementation:
- Create one EJB
- Write Business Method
- Expose EJB as webservice
- Run the web service to re-start the AS Java.
Method Implementation:
@javax.ejb.TransactionAttribute(javax.ejb.TransactionAttributeType.REQUIRES_NEW)
Public void restartASJava(){
System.exit(0);
}