geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sandip Ghayal <sgha...@yahoo.com>
Subject Re: Some more deployment questions
Date Thu, 27 Jan 2005 22:11:59 GMT
Hi David,

Thanks for response David and sorry to bug you guys
with this issues.

This is what I am trying to achieve.

1) Deploy EJB. (without resolving any references)
2) Deploy Resource 1.
3) Modify EJB plan (some how) to point to Resource 1.
4) Deploy Resource 2.
5) Change EJB plan (some how) to point to Resource 2.

Though this is not required for passing J2EE1.4 TCK
but I do think this could be the most common
applications users would like to do. (1) if Resource 1
is brought down for maintenance, users may want to
switch to using backup Resource2. Best way to do that
is to use steps 4 and 5 (2) If in current user testing
there is no need to test any Resource operations then
at this time they can avoid deploying Resource. I can
expand this to if there is a single implementation of
stateless session bean. And it has been envisioned
that usage of Resource is not compulsory for operation
of this bean. So if Resource is there then its good
and if its not there then also bean can operate.
Operation could be context.lookup("JNDI NAME") throws
back exception and bean marks that the current
deployment is not using Resource. As per current
design users will be forced to deploy Resource if they
want to use this Session Bean or create another
session bean that does not refer to resource.

What I am seeing is just different way of looking. You
are looking at it as plan-first then deploy. I am
looking at is Server should not enforce plan-first
philosophy. Deploy and plan could happen in any
sequence.

Thanks,

Sandip
--- David Jencks <djencks@gluecode.com> wrote:

> 
> On Jan 27, 2005, at 12:10 PM, Sandip Ghayal wrote:
> 
> > I have one more question/issue.
> >
> > I facing issue when trying to deploy simple
> EJB.jar
> > file which has a resource reference to connector.
> The
> > issue is as this is Jar file there is no connected
> > embedded into this jar file. Also the connector
> was
> > not previously deployed.
> >
> > So during deployment I get exception as below. The
> > exception is complaining that there is no
> > corresponding resource reference.
> >
> > Is it expected behaviour ? Should not Geronimo
> allow
> > users to do mapping of resources at later stage.
> Is
> > there any kind of workaround for this situation ?
> 
> The deployment process is expected to resolve all
> references.  There's  
> a lot of "magic" that lets you specify only a little
> bit of the  
> resource name, and the deployer will find the rest
> for you, but for  
> this to work the resource has to be available while
> you are doing the  
> deployment.  Currently the only way to reliably make
> this happen is to  
> put the resource in the parent or ancestor of the
> package/plan you are  
> trying to deploy.  This has the other effect of
> putting the resource in  
> your classpath which is often unnecessary and
> possibly undesirable.
> 
> You should be able to avoid this problem if you
> specify the entire  
> jsr-77 object name of the managed connection 
> factory wrapper gbean in   
> a target-name element.  I find the only reliable way
> to find out what  
> this might be is to deploy the resource and copy the
> name out of the  
> log.
> 
> We might have paradigm mismatch here.  :-)  I'm
> having trouble  
> imagining when "later" would be.  Could you explain
> what you have in  
> mind?
> 
> One thing to remember is the theoretical future
> existence of jsr-88  
> tools to help you write the plans before the current
> "deployment" step  
> :-)
> 
> many thanks,
> david jencks
> 
> >
> >
>
F:\geronimo\modules\assembly\target\geronimo-1.0-SNAPSHOT>java
> > -jar bin/deployer
> > .jar deploy I:\TestEjb.jar
> > Username: system
> > Password: manager
> > Deployment failed
> >   Server reports:
> > org.apache.geronimo.common.DeploymentException:
> > Unknown or amb
> > iguous resource name query:
> >
> geronimo.server:j2eeType=JCAManagedConnectionFactory
> >
>
,J2EEServer=geronimo,J2EEApplication=null,name=jdbc/Connector,*
> > match count: 0
> >
> org.apache.geronimo.kernel.InternalKernelException:
> > org.apache.geronimo.common.D
> > eploymentException: Unknown or ambiguous resource
> name
> > query: geronimo.server:j2
> >
>
eeType=JCAManagedConnectionFactory,J2EEServer=geronimo,J2EEApplication=
> 
> > null,name
> > =jdbc/Connector,* match count: 0
> >         at
> >
>
org.apache.geronimo.kernel.jmx.KernelDelegate.invoke(KernelDelegate.j
> > ava:232)
> >         at
> >
>
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Dis
> > tributeCommand.java:86)
> >         at java.lang.Thread.run(Thread.java:534)
> > Caused by:
> > org.apache.geronimo.common.DeploymentException:
> > Unknown or ambiguous
> > resource name query:
> >
>
geronimo.server:j2eeType=JCAManagedConnectionFactory,J2EESe
> >
>
rver=geronimo,J2EEApplication=null,name=jdbc/Connector,*
> > match count: 0
> >         at
> >
>
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.locat
> > eResourceName(ConnectorModuleBuilder.java:788)
> >         at
> >
>
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder$$Fast
> > ClassByCGLIB$$a535b6aa.invoke(<generated>)
> >         at
> >
>
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
> > Invoker.java:38)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
> > n.java:118)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
> > java:658)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.RawInvoker.invoke(RawInvoker.java:5
> > 7)
> >         at
> >
>
org.apache.geronimo.kernel.proxy.RawOperationInvoker.invoke(RawOperat
> > ionInvoker.java:36)
> >         at
> >
>
org.apache.geronimo.kernel.proxy.ProxyMethodInterceptor.intercept(Pro
> > xyMethodInterceptor.java:92)
> >         at
> >
>
org.apache.geronimo.j2ee.deployment.ResourceReferenceBuilder$$Enhance
> > rByCGLIB$$f168bc13.locateResourceName(<generated>)
> >         at
> >
>
org.apache.geronimo.j2ee.deployment.RefContext.getConnectionFactoryCo
> > ntainerId(RefContext.java:277)
> >         at
> >
>
org.apache.geronimo.naming.deployment.ENCConfigBuilder.getResourceCon
> > tainerId(ENCConfigBuilder.java:206)
> >         at
> >
>
org.apache.geronimo.naming.deployment.ENCConfigBuilder.addResourceRef
> > s(ENCConfigBuilder.java:188)
> >         at
> >
>
org.apache.geronimo.naming.deployment.ENCConfigBuilder.buildComponent
> > Context(ENCConfigBuilder.java:600)
> >         at
> >
>
org.openejb.deployment.SessionBuilder.processEnvironmentRefs(SessionB
> > uilder.java:138)
> >         at
> >
>
org.openejb.deployment.SessionBuilder.addEJBContainerGBean(SessionBui
> > lder.java:222)
> >         at
> >
>
org.openejb.deployment.SessionBuilder.buildBeans(SessionBuilder.java:
> > 153)
> >         at
> >
>
org.openejb.deployment.OpenEJBModuleBuilder.addGBeans(OpenEJBModuleBu
> > ilder.java:446)
> >         at
> >
>
org.openejb.deployment.OpenEJBModuleBuilder$$FastClassByCGLIB$$11bd7b
> > 20.invoke(<generated>)
> >         at
> >
>
net.sf.cglib.reflect.FastMethod.invoke(FastMethod.java:87)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.FastMethodInvoker.invoke(FastMethod
> > Invoker.java:38)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(GBeanOperatio
> > n.java:118)
> >         at
> >
>
org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(GBeanInstance.
> 
=== message truncated ===


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Mime
View raw message