Return-Path: Delivered-To: apmail-incubator-river-commits-archive@minotaur.apache.org Received: (qmail 35391 invoked from network); 13 Dec 2010 15:21:24 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Dec 2010 15:21:24 -0000 Received: (qmail 78727 invoked by uid 500); 13 Dec 2010 15:21:24 -0000 Delivered-To: apmail-incubator-river-commits-archive@incubator.apache.org Received: (qmail 78675 invoked by uid 500); 13 Dec 2010 15:21:24 -0000 Mailing-List: contact river-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: river-dev@incubator.apache.org Delivered-To: mailing list river-commits@incubator.apache.org Received: (qmail 78668 invoked by uid 99); 13 Dec 2010 15:21:23 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 15:21:23 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 13 Dec 2010 15:21:22 +0000 Received: from thor (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id oBDFL2s5027228 for ; Mon, 13 Dec 2010 15:21:02 GMT Message-ID: <32671430.91401292253662012.JavaMail.jira@thor> Date: Mon, 13 Dec 2010 10:21:02 -0500 (EST) From: "Gregg Wonderly (JIRA)" To: river-commits@incubator.apache.org Subject: [jira] Commented: (RIVER-379) Standard Deployment Descriptors and Definitions In-Reply-To: <13642425.77611292138761395.JavaMail.jira@thor> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/RIVER-379?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970847#action_12970847 ] Gregg Wonderly commented on RIVER-379: -------------------------------------- Here's how I have been thinking about this. Existing containers would probably be better off being told about a service instance that wants to be managed in the container, and then being able to query them for information so that "order of operations" could be continued to be managed by those containers, rather than having some thread calling into them to tell them what to do. Also, com.sun.jini.start.ServiceStarter Configuration data should be useful for deploying services into a container in its raw form. I think that the java.util.ServiceLoader mechanisms might provide some mechanics in how containers would advertise their services within a JVM. So, defining some classes and interfaces in that direction, something like the following would encapsulate what I've been thinking about. For the ServiceLoader SPI we might define a simple interface such as: public interface JiniServiceStarter { public void addInstance( JiniService inst ); } For the service instances themselves, I think it is important to make sure that the containers control the order of operations how they want so that they can use calls into the users code to tell the user what is happening next, or to ask for information needed for deployment. public interface JiniService { public ServiceControl getDefinition( JiniService svc ); } This definition allows a single class, such as com.sun.jini.start.ServiceStarter, to be the gateway to information about multiple service instances. public interface ServiceControl { // Get the Configuration for the service public Configuration getConfiguration(); // Get the unexported object so that the container to "export" how needed. public Remote getExportableServiceObject(); // get the list of classes that should be used as the class path for the service. public List getClassPath(); // get the codebase annotations to use for the created classloader(s) public List getCodeBase(); // tell the service it is starting with this information. The args[] // provides access to command line options, the Configuration // is a Configuration provided by the container. This configuration // should be used by the service for all of its activities. This allows // dynamic configuration editing to be provided by the container. // it might, for example actually allow editing of the getConfiguration() // data and just provide that again, or it might amend the configuration // and provide that in this call. public void serivceStarting( String args[], Configuration config ); // The service is not advertized and running with the indicated classloader // and service instance. Remote is used at a minimum instead of // Object to allow other activities to be performed by the service with // the Remote Object. public void serviceRunning( ClassLoader cl, Remote instance ); // The service instance was stopped and unloaded and the ServiceControl // instance should drop all references to the service so it can be GC'd public void serviceStopped(); } There are all kinds of scenarios running around in my head that make the arguments to the above methods interesting. Would any of these things be problematic to containers today? Feel free to counter and change around these things how you see it so that we can find out what makes the most sense. > Standard Deployment Descriptors and Definitions > ----------------------------------------------- > > Key: RIVER-379 > URL: https://issues.apache.org/jira/browse/RIVER-379 > Project: River > Issue Type: Brainstorming > Components: com_sun_jini_start > Affects Versions: AR4 > Environment: All > Reporter: Peter Firmstone > Priority: Minor > > Common standards for deployment. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.