[jboss-user] [Installation, Configuration & DEPLOYMENT] - HTTPConnection in startup servlet works only with hot deploy

venuwin do-not-reply at jboss.com
Wed Sep 3 01:25:29 EDT 2008


* We are developing a J2EE application in which we have to download some XML when the WAR file(Say MyApp.WAR.) is deployed.

*  I have put the downloading XML logic to be called from a startup servlet. So far so good.

* I have 5 customers for whom i would have to have 5 WAR files like MyApp1.WAR,MyApp2.WAR,MyApp3.WAR,MyApp4.WAR,MyApp5.WAR but all these WAR files have to download XMLs which are unique for each WAR.

Real Problem comes when i restart JBoss. The deployer does not proceed further after the line in my code where i read the input stream, which results in the failure of all further deployments in the same server.

  | u = new URL (url);
  | httpConn = ( HttpURLConnection )  u.openConnection (  );
  |  httpConn.setRequestMethod ( "GET" ) ; 
  | Log.info(AppConstants.LOG_CATEGORY," before http connection");
  | httpConn.connect () ; 
  | Log.info(AppConstants.LOG_CATEGORY,"after http connection");
  | if(httpConn !=null)
  |   {
  |   try
  |     {
  | 	inputStream=httpConn.getInputStream(); // here is where it hangs
  |     }catch (Exception e) {
  | Log.error(AppConstants.LOG_CATEGORY,"Exception fetching inputstream :"+e);
  | 					}

* In the above code, it doesnt even throw an exception, just hangs .

* to fix this, i have to remove all 5 WAR files out of deploy folder, start JBoss and then place all the WAR files back to the deploy folder. It works fine.
* I don't understand why it works only with Hot deploy and not with a restart.
* Please let me know if anything could be done on this (or) in case you need more info.


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4173847#4173847

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4173847

More information about the jboss-user mailing list