-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Farrukh,

On 3/29/12 9:02 AM, Farrukh Najmi wrote:
> In my webapp I am using java.util.ServiceLoader class to
> dynamically load jars using an HttpUrlConnection to the jar served
> by the static app in the tomcat instance.

Is your webapp hanging during initial deployment (when Tomcat comes
up) or always when re-deploying?

Tomcat 7 (not sure about prior versions) deploys all webapps /before/
starting the Connectors, which means that Tomcat isn't actually
serving requests on any ports when your webapps is first deployed.
Only after all webapps have been initialized will Tomcat actually
start the connectors.

> Again, My solution needs to work in a web container independent
> manner so it works on Tomcat, Glassfish etc.).

I think you're out of luck, here, unless you either a) put your static
resource on the disk and read it from there or b) make your static
resource available through a separate web server (which could be
Tomcat for all anyone cares).

> If I do not find a way to do this then the fallback would be to do
> the dynamic loading of plugin jars lazily after server startup.

That might be a better option in general: even if Tomcat's connectors
were serving requests, there's nothing that says your static
resource's webapp would have been deployed when you need it -- it
would only be a coincidence or a non-spec-compliant configuration for
the container and therefore non-portable.

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.17 (Darwin)
Comment: GPGTools - http://gpgtools.org
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk900VsACgkQ9CaO5/Lv0PDRCgCfed0OUUVeQCp10QgPv7GCoeQI
j98AoJlUkD+CU8r4WCtFFI+Q8L3JSPUQ
=NpdT
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org

Reply via email to