Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos

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);

}


1 Comment
Labels in this area