-
1. Re: HTTPConnection in startup servlet works only with hot de
peterj Sep 3, 2008 12:46 PM (in response to venuwin)Where is the above code located?
Do you have your servlets set for load-on-startup?
What is the value of the variable 'url' in the above code? -
2. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 4, 2008 12:37 AM (in response to venuwin)the code is in startup servlet
yes it is defined for load-on-startup in web.xml -
3. Re: HTTPConnection in startup servlet works only with hot de
skajotde Sep 4, 2008 4:57 AM (in response to venuwin)Do you have isolated classloaders ?
If no, probably you are doing something after deploying this is required to proper deploy. And on next deploy eg some static variable is on server (it is the same classloader) and deploying finish successful. -
4. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 4, 2008 7:01 AM (in response to venuwin)there is no question of some variable after deploy. The deployer hangs at the line where i try to read the input stream of XML URL. Your idea is ruled out. Please avoid giving vague answers .
-
5. Re: HTTPConnection in startup servlet works only with hot de
jaikiran Sep 4, 2008 8:26 AM (in response to venuwin)"venuwin" wrote:
there is no question of some variable after deploy. The deployer hangs at the line where i try to read the input stream of XML URL. Your idea is ruled out. Please avoid giving vague answers .
Venu,
Everyone here is trying to help you. Please do not be rude to fellow posters. -
6. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 4, 2008 8:37 AM (in response to venuwin)Jaikiran,
already enough info is given in my first post. I am even not of that kind. When you are posting something, please see to that the problem is fully understood or ask for more info. I am glad to hear from our folks for more info. -
7. Re: HTTPConnection in startup servlet works only with hot de
jaikiran Sep 4, 2008 8:53 AM (in response to venuwin)Venu, you probably missed this question
"PeterJ" wrote:
What is the value of the variable 'url' in the above code? -
8. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 4, 2008 10:41 AM (in response to venuwin)Jai,
the value is http://static.xyz.com/cat/up.xml -
9. Re: HTTPConnection in startup servlet works only with hot de
peterj Sep 4, 2008 11:40 AM (in response to venuwin)OK, that rules out some obscure timing issue, which could have been the problem if the url was http://localhost:8080/xxxxx.
I cannot think of any plausible reason why an outbound connection would have an issue during jbossas startup (even jbossas itself has at time made such requests).
All I can think of at this time to try turning off load-on-startup. -
10. Re: HTTPConnection in startup servlet works only with hot de
jaikiran Sep 4, 2008 11:47 AM (in response to venuwin)In addition to what Peter said, is static.xyz.com some external site or is it a virtual host that you have setup?
-
11. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 5, 2008 12:56 AM (in response to venuwin)Hi Peter,
the URL http://static.xyz.com/cat/up.xml refers to the local machine only. But just to make the code work with any URL for that matter, we have not replaced it with localhost. Would that make a difference. If so, why does it work after JBoss startup. Or does JBoss has some problems in inbound connections before it could start completely ? -
12. Re: HTTPConnection in startup servlet works only with hot de
skajotde Sep 5, 2008 7:57 AM (in response to venuwin)"venuwin" wrote:
there is no question of some variable after deploy. The deployer hangs at the line where i try to read the input stream of XML URL. Your idea is ruled out. Please avoid giving vague answers .
there was question about cause of problem. I give one of answer and asked are you using isolated classloader. Maybe your code (or some jboss code) modify java way connecting to http and on next deploy old classess are holded. Thanks for rude answer ;/ -
13. Re: HTTPConnection in startup servlet works only with hot de
peterj Sep 5, 2008 11:18 AM (in response to venuwin)Is http://static.xyz.com/cat/up.xml handled by the JBossAS you are starting up or by some other process (such as IIS or HTTPD)?
If it is handled by JBossAS, then you have hit a timing hole - the app server is just not ready to service your request - you will have to wait until the app server is finished initializing. Hence my suggestion of removing load-on-startup. An alternative that might work is to create a deploy.last directory within the deploy directory and place you WAR files there. They will then not be deployed until everything else is deployed.
And to echo Kamil's sentiments, if I would have realized that you would have been rude to someone who you think did not adequately answer your question, I never would have responded to your original post because honestly, other than the possible timing issue, I have no idea what the problem is, I am just trying to eliminate possibilities (which I am sure is what Kamil was attempting also). -
14. Re: HTTPConnection in startup servlet works only with hot de
venuwin Sep 8, 2008 2:12 AM (in response to venuwin)Hi Peter and Kamil,
I'm sorry if i had hurt any one of you. Would try this and let you know. The logic has been removed from startup servlet and put in a separate thread which would be invoked on first hit of index.jsp. This works fine.
Thanks Men !