What if those classes are only availble in the target server?
-----Original Message-----
From: Dain Sundstrom [mailto:[EMAIL PROTECTED]
Sent: Tue 1/25/2005 5:21 PM
To: [EMAIL PROTECTED]
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:[EMAIL PROTECTED]
> Sent: Tue 1/25/2005 5:01 PM
> To: [EMAIL PROTECTED]
> 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, [EMAIL PROTECTED] 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>>
