geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dain Sundstrom <dsundst...@gluecode.com>
Subject Re: svn commit: r126427 - /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/deployment/service/ServiceConfigBuilder.java
Date Tue, 25 Jan 2005 23:34:01 GMT
I guess there are two scenarios here 1) were deploying to the target  
server live in which case the dependencies will be there, and 2) were  
building a .car file offline for a different target server.  In the   
*rare* second case, I would hope the the offline vm had access to the  
same repo since many deployment steps need to verify the classes used  
in a deployment.  I expect this need to increase as we round out  
geronimo with more verification code.

As a side note, I was just thinking about this the other day, because I  
think it would be nice to be able to have deployment create a single  
re-distributable unit which contained all dependencies needed (like a  
.car file).  This would be useful for things like app clients, were we  
could export an executable car with all dependencies nested.  Anyway,  
just a random thought.

-dain

On Jan 25, 2005, at 2:21 PM, Alan D. Cabrera wrote:

> What if those classes are only availble in the target server?
>
> 	-----Original Message-----
> 	From: Dain Sundstrom [mailto:dsundstrom@gluecode.com]
> 	Sent: Tue 1/25/2005 5:21 PM
> 	To: dev@geronimo.apache.org
> 	Cc:
> 	Subject: Re: svn commit: r126427 -  
> /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/ 
> deployment/service/ServiceConfigBuilder.java
> 	
> 	
>
> 	Why?  I seems to me that if you say you have a dependency we should
> 	verify that we can satisfy that dependency before deploying.
> 	
> 	-dain
> 	
> 	On Jan 25, 2005, at 2:00 PM, Alan D. Cabrera wrote:
> 	
> 	> I am of the opinion that this feature should be optional.
> 	>
> 	>
> 	> Regards,
> 	> Alan
> 	>
> 	>       -----Original Message-----
> 	>       From: Gianny Damour [mailto:gianny.damour@optusnet.com.au]
> 	>       Sent: Tue 1/25/2005 5:01 PM
> 	>       To: dev@geronimo.apache.org
> 	>       Cc:
> 	>       Subject: Re: svn commit: r126427 -
> 	>  
> /geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/
> 	> deployment/service/ServiceConfigBuilder.java
> 	>
> 	>
> 	>
> 	>       Hi David,
> 	>
> 	>       It seems that this is related to this JIRA issue:
> 	>
> 	>         [
> 	> http://nagoya.apache.org/jira/browse/GERONIMO-504?
> 	> page=comments#action_55900 ]
> 	>
> 	>       that Jeremy has commented.
> 	>
> 	>       Thanks,
> 	>       Gianny
> 	>
> 	>       On 26/01/2005 8:33 AM, David Jencks wrote:
> 	>
> 	>       > I'd like to check that this doesn't violate any  
> philosophical
> 	>       > principles behind deployment.  I think that all classes  
> used at
> 	>       > runtime  should be available at deployment time: this patch  
> checks
> 	>       > that all  dependencies are in fact present at deployment  
> time.  Any
> 	>       > arguments?
> 	>       >
> 	>       > thanks
> 	>       > david jencks
> 	>       >
> 	>       > On Jan 25, 2005, at 1:30 PM, djencks@apache.org wrote:
> 	>       >
> 	>       >> Author: djencks
> 	>       >> Date: Tue Jan 25 13:30:16 2005
> 	>       >> New Revision: 126427
> 	>       >>
> 	>       >> URL: http://svn.apache.org/viewcvs?view=rev&rev=126427
> 	>       >> Log:
> 	>       >> If a dependency is missing, let us know immediately, not  
> when a
> 	>       >> class  can't be loaded
> 	>       >> Modified:
> 	>       >>
> 	>       >>
> 	> geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/
> 	>       >> deployment/service/ServiceConfigBuilder.java
> 	>       >>
> 	>       >> Modified:
> 	>       >>
> 	> geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/
> 	>       >> deployment/service/ServiceConfigBuilder.java
> 	>       >> Url:
> 	>       >>
> 	>  
> http://svn.apache.org/viewcvs/geronimo/trunk/modules/service-builder/
> 	>       >> src/java/org/apache/geronimo/deployment/service/
> 	>       >>  
> ServiceConfigBuilder.java?view=diff&rev=126427&p1=geronimo/trunk/
> 	>       >>  
> modules/service-builder/src/java/org/apache/geronimo/deployment/
> 	>       >>
> 	>  
> service/ServiceConfigBuilder.java&r1=126426&p2=geronimo/trunk/modules/
> 	>       >>  
> service-builder/src/java/org/apache/geronimo/deployment/service/
> 	>       >> ServiceConfigBuilder.java&r2=126427
> 	>       >>
> 	>  
> =======================================================================
> 	>       >> =======
> 	>       >> ---
> 	>       >>
> 	> geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/
> 	>       >> deployment/service/ServiceConfigBuilder.java    (original)
> 	>       >> +++
> 	>       >>
> 	> geronimo/trunk/modules/service-builder/src/java/org/apache/geronimo/
> 	>       >> deployment/service/ServiceConfigBuilder.java    Tue Jan 25
> 	> 13:30:16 2005
> 	>       >> @@ -53,6 +53,7 @@
> 	>       >>  import org.apache.geronimo.kernel.Kernel;
> 	>       >>  import  
> org.apache.geronimo.kernel.config.ConfigurationModuleType;
> 	>       >>  import org.apache.geronimo.kernel.repository.Repository;
> 	>       >> +import
> 	>       >>  
> org.apache.geronimo.kernel.repository.MissingDependencyException;
> 	>       >>  import org.apache.xmlbeans.XmlException;
> 	>       >>
> 	>       >>  /**
> 	>       >> @@ -153,7 +154,7 @@
> 	>       >>      public static void addIncludes(DeploymentContext  
> context,
> 	>       >> DependencyType[] includes, Repository repository) throws
> 	>       >> DeploymentException {
> 	>       >>          for (int i = 0; i < includes.length; i++) {
> 	>       >>              DependencyType include = includes[i];
> 	>       >> -            URI uri = getDependencyURI(include);
> 	>       >> +            URI uri = getDependencyURI(include,  
> repository);
> 	>       >>              String name = uri.toString();
> 	>       >>              int idx = name.lastIndexOf('/');
> 	>       >>              if (idx != -1) {
> 	>       >> @@ -176,7 +177,7 @@
> 	>       >>
> 	>       >>      public static void addDependencies(DeploymentContext  
> context,
> 	>       >> DependencyType[] deps, Repository repository) throws
> 	>       >> DeploymentException {
> 	>       >>          for (int i = 0; i < deps.length; i++) {
> 	>       >> -            URI dependencyURI = getDependencyURI(deps[i]);
> 	>       >> +            URI dependencyURI = getDependencyURI(deps[i],
> 	> repository);
> 	>       >>              context.addDependency(dependencyURI);
> 	>       >>
> 	>       >>              URL url;
> 	>       >> @@ -264,7 +265,7 @@
> 	>       >>          return gBeanData;
> 	>       >>      }
> 	>       >>
> 	>       >> -    private static URI getDependencyURI(DependencyType  
> dep) throws
> 	>       >> DeploymentException {
> 	>       >> +    private static URI getDependencyURI(DependencyType  
> dep,
> 	>       >> Repository repository) throws DeploymentException {
> 	>       >>          URI uri;
> 	>       >>          if (dep.isSetUri()) {
> 	>       >>              try {
> 	>       >> @@ -280,6 +281,9 @@
> 	>       >>              } catch (URISyntaxException e) {
> 	>       >>                  throw new DeploymentException("Unable to  
> construct
> 	>       >> URI for groupId=" + dep.getGroupId() + ", artifactId=" +
> 	>       >> dep.getArtifactId() + ", version=" + dep.getVersion(), e);
> 	>       >>              }
> 	>       >> +        }
> 	>       >> +        if (!repository.hasURI(uri)) {
> 	>       >> +            throw new DeploymentException(new
> 	>       >> MissingDependencyException("uri " + uri + " not found in
> 	> repository"));
> 	>       >>          }
> 	>       >>          return uri;
> 	>       >>      }
> 	>       >>
> 	>       >
> 	>       >
> 	>
> 	>
> 	>
> 	
> 	
>
> <winmail.dat>


Mime
View raw message