On Jan 28, 2005, at 9:51 AM, Sandip Ghayal wrote:
Just continuing our discussion from yesterday.
I am little confused.
As I understand from yesterdays discussion, I need to deploy Resoruce first and then the EJB
yes, unless they are both in an ear
So I tried to deploy connector rar file first and then my EJB which would have refrence to this, but then I get error as below (Error#1) when trying to deploy connector
I was under the impression that plans are created on the fly and users does not have to do anything much for that. Is there any thing I need to do before I can deploy this connector ? (The connector is standard J2EE 1.4 connector)
You always need a plan for a connector. We can talk about this more, but to me the ra.xml is really a description of a type rather than an instance. All other j2ee dds describe what I consider an instance. Maybe you can convince me there is a way to reasonably extract a default instance description from the ra.xml :-)
I looked at the docs and found that there was requirement to create geronimo-ra.xml file before one can deploy connectors. I think this requirement has been removed (after watching up some of the deployment related messages). But still I created geronimo-ra.xml and put it into the Connector rar file. After doing this I get different error (as per error#2)
You don't need to put the plan in the connector, you can deploy it standalone instead, but you still need a plan.
Next thing I tried was to combine connector rar and my EJB's JAR file into a EAR file and try to deploy that EAR file. I also created application.xml file for this purpose, but again during deployment I got error#2.
Command that I used to start Geronimo Server: # java -jar bin\server.jar org/apache/geronimo/RuntimeDeployer org/apache/geronimo/DebugConsole
that is reasonable, but you should be able to just say java -ea -jar bin/server.jar
and due to the persistent configuration list everything should start (famous last words :-)
Command that I used to do deployment: # java -jar bin\deployer.jar deploy I:\TestEar.ear
looks good
I have a feeling that I am missing some crucial part in entire deployment process and some how its either not mention in the docs or I am looking at the wrong docs.
I think you've found our least informative and most frustrating error message :-)
Most likely something is preventing some of the deployer gbeans from starting. You can check geronimo.log (basedir/var/log/geronimo.log) for messages like
waiting to start: .... cause...
Information on non-started gbeans should also show up on the console at the end of server startup.
Hope this helps... if not can you send me privately the geronimo.log?
thanks david jencks
----------------------------------------------------------------------
ERROR#1:
----------------------------------------------------------------------
Deployment failed
Server reports:
org.apache.geronimo.common.DeploymentException: A
connector module must be deployed using a plan
org.apache.geronimo.kernel.InternalKernelException:
org.apache.geronimo.common.DeploymentException: A
connector module must be
deployed using a plan
at
org.apache.geronimo.kernel.jmx.KernelDelegate.invoke(KernelDelegate.jav a:232
)
at
org.apache.geronimo.deployment.plugin.local.DistributeCommand.run(Distr ibute
Command.java:86)
at java.lang.Thread.run(Thread.java:534)
Caused by:
org.apache.geronimo.common.DeploymentException: A
connector
module must be deployed using a plan
at
org.apache.geronimo.connector.deployment.ConnectorModuleBuilder.creat
----------------------------------------------------------------------- --------------
Error #2:
----------------------------------------------------------------------- --------------
Deployment failed
Server reports:
org.apache.geronimo.common.DeploymentException: Syntax
error i
n deployment plan or no deployer service available
(currently I can't tell the d
ifference):,
moduleFileC:\DOCUME~1\sghayal\LOCALS~1\Temp\deployer34036.tmpdir\JD
BCwhitebox-tx.rar
org.apache.geronimo.kernel.InternalKernelException:
org.apache.geronimo.common.D
eploymentException: Syntax error in deployment plan or
no deployer service avail
able (currently I can't tell the difference):,
moduleFileC:\DOCUME~1\sghayal\LOC
ALS~1\Temp\deployer34036.tmpdir\JDBCwhitebox-tx.rar
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)
----------------------------------------------------------------------- --------
Thanks,
Sandip Ghayal --- Sandip Ghayal <[EMAIL PROTECTED]> wrote:
I agree with point 1 and 2 completely.
Thanks once again.
Cheers,
Sandip --- David Jencks <[EMAIL PROTECTED]> wrote:
references)
On Jan 27, 2005, at 2:11 PM, Sandip Ghayal wrote:
guysHi David,
Thanks for response David and sorry to bug youwith this issues.
No problem, maybe we'll learn something :-)
This is what I am trying to achieve.
1) Deploy EJB. (without resolving anyResource2) Deploy Resource 1. 3) Modify EJB plan (some how) to point to1.Resource4) Deploy Resource 2. 5) Change EJB plan (some how) to point to2.to
Currently there is no way to do this in geronimo. So, we can discuss whether this is a good idea and how it might be possible to implement it.
Though this is not required for passing J2EE1.4TCKResource 1but I do think this could be the most common applications users would like to do. (1) ifis brought down for maintenance, users may wantIswitch to using backup Resource2. Best way to dothatis to use steps 4 and 5 (2) If in current usertestingthere is no need to test any Resource operationsthenat this time they can avoid deploying Resource.canimplementationexpand this to if there is a singleofenvisionedstateless session bean. And it has beenifthat usage of Resource is not compulsory foroperationof this bean. So if Resource is there then itsgoodthrowsand if its not there then also bean can operate. Operation could be context.lookup("JNDI NAME")back exception and bean marks that the current deployment is not using Resource. As per current design users will be forced to deploy Resourcetheylooking.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 ofYouamare looking at it as plan-first then deploy. Iplan-firstlooking at is Server should not enforceisn'tphilosophy. Deploy and plan could happen in any sequence.
I think there are 2 scenarios you are proposing:
1. optional resource refs. If a resource-refthatconfigured to point to anything, the application can still deploy, but if it tried to look up the resource it will get a naming error. One easy way to implement this would be with a tag in the plan indicatingcausethe resource-ref is optional. We could try to resolve the link and ignore failure. If an entire target name is supplied we bind a reference to it, and if the gbean is missing at runtime, you'll get an error when you try to look it up (can't make a proxy). The second couldalsoa problem when starting the configuration if we turned the jndi references into gbean dependencies, something I am in favor of. (seerunning(2))
2. changing what a resource-ref is pointing to at runtime, while the app is running. This IMO is harder and some implementations are counter to some of our philosophical bases (or biases). One of the basic ideas of the deployment system is that we convert whatever plans/modules/whatever you deploy into binary configurations in which all references are completely resolved. You can digitally sign these, pass them around, deploy on multiple servers, etc, and have (through the signature) some good evidence of what isbuildingwhere. IMO completely resolving all references beforedeploythe binary configuration is an important part of auditability of the configuration when it is running. So, being able to swap what's underneath a running program might conflict with this idea.
What I'd prefer to see is a good versioning system for configurations, together with the ability to hot-switch between different versions of the same app. What you'd do is configure andconnectora new version of your app so the ejbs are pointing to resource 2 rather than resource 1, deploy the second version, and undeploy the first version.
Assuming we could actually implement this, do you think it would cover what you want?
many thanks, david jencks
wrote:
Thanks,
Sandip --- David Jencks <[EMAIL PROTECTED]> wrote:
On Jan 27, 2005, at 12:10 PM, Sandip Ghayalconnector.
EJB.jarI have one more question/issue.
I facing issue when trying to deploy simplefile which has a resource reference toconnectedTheissue is as this is Jar file there is noembedded into this jar file. Also thestage.Thewasnot previously deployed.
So during deployment I get exception as below.allowexception is complaining that there is no corresponding resource reference.
Is it expected behaviour ? Should not Geronimousers to do mapping of resources at latersituationIsthere any kind of workaround for this?all
The deployment process is expected to resolvelittlereferences. There's a lot of "magic" that lets you specify only a
=== message truncated ===
__________________________________ Do you Yahoo!? The all-new My Yahoo! - What will yours do? http://my.yahoo.com
