- This topic has 4 replies, 3 voices, and was last updated 13 years, 9 months ago by joyceewy.
-
AuthorPosts
-
joyceewyParticipantI’m converting a working J2EE project from WAS 6.0 to WAS 6.1 using MyEclipseBlue. A crucial part of my app is a JVM environment variable that tells the app if it’s running in local, dev, tst, or prod. I’ve put the environment variable in 6.1 in the same fashion as I did in 6.0, but my app isn’t seeing it. It still comes up null when it calls that value. I’ve restarted the server several times and it still doesn’t show up.
The variable is set using the local admin console: Application servers/server1/Process Definitions/Java Virtual Machine/Custom Properties. It is called in the app with the call: String server = System.getProperty(“com.lilly.isg.env.server”);
Is there something in MyEclipseBlue that is holding me up? Is there a way to restart only the JVM, or does restarting the whole server do that? This worked in RAD, so I know it should work. But for some reason it’s not picking it up in MyEclipseBlue.
support-swapnaModeratorjoyceewy,
Can you enter that property on JDK configuration page of Websphere 6.1 server instance?
Here are the steps :
a) Right click on the WAS 6.1 under Servers tab, select the ‘configure server connector’. You can also go from Window > Preferences > MyEclipse > Servers > Websphere 6.1.
b) This will open up the edit screen. Hit next to get to the JDK configuration page.
c) Enter the property under the ‘Optional Java VM arguments’. Ex: -Dcom.lilly.isg.env.server=xxxLet us know how this works for you.
joyceewyParticipantI tried adding my property to the ‘Optional Java VM arguments and it doesn’t recognize it. Here is how it looks in the argument box (first argument populated automatically):
-Xscmx50M -Xms50m -Xmx256M
com.lilly.isg.env.server=localWhen I try to start the server, I get this message:
The java class is not found: com.lilly.isg.env.server=local
Any other ideas? Thanks!
support-piotrParticipantjoyceewy,
Please add “-D” before your argument. Your argument box should look like this:
-Xscmx50M -Xms50m -Xmx256M -Dcom.lilly.isg.env.server=local
Let us know how this works for you.
joyceewyParticipantExcellent. That fixed it. Thank you!
-
AuthorPosts