Applies To : All JDK
Author(s): Biplab Ray
Company: Tata Consultancy Services
Created on:17th 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:
Java code would only work on jvm of server instance.
We should know about Heap Memory, below is few information about Heap Memory
Heap Memory:
The JVM has a heap that is the runtime data area from which memory for all class instances and arrays are allocated. It is created at the JVM start-up.
The heap size may be configured with the following VM options:
-Xmx<size> - to set the maximum Java heap size
-Xms<size> - to set the initial Java heap size
By default, the maximum heap size is 64 Mb.
Heap memory for objects is reclaimed by an automatic memory management system which is known as a garbage collector. The heap may be of a fixed size or may be expanded and shrunk, depending on the garbage collector's strategy.
Advantage :
1. If we restart the JVM, we would get fresh JVM from begin.
Implementation:
1. Create one EJB
2. Write Business Method
3. Expose EJB as webservice
4. Run the webservice to re-start the WAS Java.
Method Implementation :
Public void restartASJava(){
System.exit(0);
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
8 | |
5 | |
5 | |
4 | |
4 | |
4 | |
3 | |
3 | |
3 | |
2 |