dev@glassfish.java.net

Re: Resource Autodeployment

From: Jason Lee <jason_at_steeplesoft.com>
Date: Tue, 3 Jun 2008 16:06:51 -0500

On Tue, Jun 3, 2008 at 3:40 PM, Hong Zhang <Hong.Zhang_at_sun.com> wrote:

> This sounds ok. But if we use the second option you mentioned before
> (creating a jar), we could possibly re-use the existing InputJarArchive and
> JarHandler code.
>

That's an excellent point, and unless I miss my guess, that Jar creation can
still be handle by the ArchiveFactory, even if redirectly. Let me think
along those lines and see where that gets me...


> The code in DeployCommand to handle redeployment is just to call
> UndeployCommand first. So as long as we can make sure the UndeployCommand
> can undeploy the resources properly, the code in DeployCommand to handle
> redeployment for other archives could be used to handle the resource archive
> as well.
>

Perfect.


> You would need to write a ResourceDeployer to handle the lifecycle of the
> resources.
>
> In v2, there used to be a ResourcesMBean which can be used to create/delete
> resources. I am not sure what's the equivalent of that in v3. Your
> ResourceDeployer should be just calling the equivalent of this
> ResourcesMBean to create/delete resources.
>
> I have Cced Jagadish in this thread. He is the owner of the resource
> backend. He should be able to help you on this.
>
> The ResourceDeployer will be invoked (through Sniffer/ContainerInfo) in
> ApplicationLifecycle to do the deployment/undeployment of the resources.
>

OK. I had just traced the execution through those classes (I'm looking at
the web-related classes for a concrete example of how all this works). I'm
still not sure what container this would be associated with and how the
ResourceDeployer reference would be acquired, but I'm getting there...


> Jadagish should be able to point you to the right directories for this.
>

That would be great. :)

-- 
Jason Lee, SCJP
Software Architect -- Objectstream, Inc.
Mojarra and Mojarra Scales Dev Team
https://mojarra.dev.java.net
https://scales.dev.java.net
http://blogs.steeplesoft.com