Run time JVM Properties are defined as following ::
java “JVM Properties” “Application name” “application parameters”
I wrote a java service but I need to pass a spesific JVM properties for it. How do I do this for Integration server.
Thanks in advance
There are two ways to tackle this problem.
- Edit your server.bat file. The server.bat file’s sole purpose is to write the runserver.bat file. Look at your existing runserver.bat file and you will see the command line that started your most recent instance of Integration Server. Because runserver.bat is generated on-the-fly by server.bat, you should put any JVM properties in server.bat.
If you need assistance manipulating server.bat, let me know.
- Use system.setProperty(“YourProperty”,“YourValue”) and then access this variable using String s = System.getProperty(“YourProperty”) within your service. I will typically use a startup service to load properties from file or a database and then and set these system variables when a package loads.
Again, if you need some guidance, just ask.
As you said there are two was to set the system property
- via -D option in server.bat/server.sh
- via a java service within the IS System.setProperty(“Property”, “Value”).
Are both options 100% equivalent? Will they have the same impact?
Let us say if there is an adapter and that needs a property to be set in the begining, For example: com.ibm.CORBA.ConfigURL property for EJB Adapter with WebSphere - http://www-3.ibm.com/software/webservers/appserv/doc/v40/ae/infocenter/was/050701.html. It doesn’t seem to behave equivalent.
Can someone please clarify?