A pleasant day to all of you. I would like to seek your kind assistance with my problem below.

To give you a summarized description, I'm currently creating a client version of the Administrative function of the admin console, namely install, uninstall, stop, start and update(redeploy) applications. I was able to make them all work except for the update(redeploy) function. Actually, I wasn't encountering any error and in fact the codes below executed properly, however, when I checked the application, it wasn't updated with the new ear file (i.e. I added new println statements and new items on my jsp page). Please be assured that I made sure I am using the new ear file before I performed the update(redeploy) function.

Below is the update(redeploy) function.

synchronized private String[] redeployApplication(String appname, String linuxserver, String wasport, String usrname, String usrpwd, String earname)
String[] result = new String[3];

try {
String earfile = "/tmp/earfiles/"+earname+".ear";

Properties props = new Properties();
props.setProperty(AdminClient.CONNECTOR_TYPE,Admin Client.CONNECTOR_TYPE_SOAP);
props.setProperty(AdminClient.CONNECTOR_HOST,linux server);
props.setProperty(AdminClient.CONNECTOR_PORT,waspo rt);
props.setProperty(AdminClient.CONNECTOR_SECURITY_E NABLED, "true");
props.setProperty(AdminClient.USERNAME, usrname);
props.setProperty(AdminClient.PASSWORD, usrpwd);

AdminClient adminClient = null;
adminClient = AdminClientFactory.createAdminClient(props);
ObjectName queryMBean = new ObjectName("WebSphere:type=AppManagement,*");
ObjectName AppMgrMBean = (ObjectName) adminClient.queryNames(queryMBean, null).iterator().next();
AppManagement appMgmt = AppManagementProxy.getJMXProxyForClient(adminClien t);
Hashtable prefs = new Hashtable();
prefs.put(AppConstants.APPDEPL_LOCALE, Locale.getDefault());

appMgmt.redeployApplication(earfile, appname, prefs, null);

result[0] = "success";
result[1] = appname + " has been redeployed.";
result[2] = "";
} catch(Exception e){
result[0] = "Error";
result[1] = appname + " encountered error during redeploy.";
result[2] = "Error : " + e;
return result;

Lastly, is there any way I could query the state of my installed application, i.e. whether it's started or stopped?

Thank you very much for your time and help.