On Sun, 8 Jan 2006, David Jencks wrote:
On Jan 8, 2006, at 8:12 PM, Michael Allman wrote:
On Sun, 8 Jan 2006, David Jencks wrote:
On Jan 8, 2006, at 7:38 PM, Michael Allman wrote:
I'm developing said resource adapter, and when I rebuild it I would like
to redeploy it once and have all the connection factories use the new
archive.
I've tried doing this with configurations that reference the configId of
the resource adapter as the parentId. I only get a cryptic error message
from the deployer.
that ought to work, I've done it with a chain of about 6 resource adapters
that share classes. However I think option 1 will be by far the most
convenient for you.
Option 1 is not really a workable option for me because the connection
definitions support unrelated applications. I want to keep them in
separate files in separate projects.
I'm attaching a couple of deployment plans. The resource adapter I'm
deploying is for Sleepycat Software's Berkeley DB XML and can be found at
http://berkeley-dbxml-adapter.dev.java.net/.
The file "dbxml-ra.xml" is supposed to be the "minimal configuration" plan
I deploy with the resource adapter archive itself. The file
"dbxmltest-env1.xml" is one of the connection definition configurations. It
is my intention that it reference the resource adapter instance deployed
with the "dbxml-ra.xml" plan. So I do
java -jar bin/deployer.jar berkeley-dbxml.rar dbxml-ra.xml
and that works. Then I do
java -jar bin/deployer.jar dbxmltest-env1.xml
and that fails with
Error: Unable to distribute dbxmltest-env1.xml: Cannot deploy the
requested application module
(planFile=dbxmltest-env1.xml)
What am I doing wrong?
I pretty much completely misunderstood what you were trying to do. To deploy
a j2ee artifact you always need both the j2ee artifact and (for a connector
anyway) the plan. So (except for the trick explained below) you need to
follow (3) exactly as stated.
What I had was a situation where one application used 6 different resource
adapters that happened to have identical class jars inside, and where I
needed to end up with only one copy of each class in the application. In
order to do that I had to make a chain of the 6 resource adapters so only the
classes from the first were actually used, even though there were separate
classloaders for each rar.
One trick we have that you might find useful is the ability to add modules to
an ear plan, even though the module is not included in the ear itself. In
fact you can make a "virtual ear" entirely out of external modules. That way
you can get the db plan in with the rest of your app without physically
including the rar in your ear. Some examples are the daytrader configs
(starting with an ear) and the uddi-server configs (starting with just a war
and creating a "virtual ear")
I started looking into the daytrader app you mentioned. I think I found
its deployed instance in config-store/28, but it looks like it bundles the
activemq and tranql resource adapters under the TradeDataSource and
TradeJMS subdirectories, respectively. Are you saying they don't need to
be there, that they could be referenced from the daytrader app somehow?
I couldn't find the ear deployment plan either. Is that recoverable from
config.ser somehow, or am I looking in the wrong place?
Thank you.
Michael
thanks
david jencks
Thank you.
Michael
thanks
david jencks
Michael
On Sun, 8 Jan 2006, Aaron Mulder wrote:
I believe there are 3 ways you could do this:
1) Create a single geronimo-ra.xml with more than one resourceadapter
entry in it, each of which defines a separate Geronimo configuration
(including a separate outbound connection factory)
2) Create a single geronimo-ra.xml with one resourceadapter entry,
containing one outbound-resourceadapter, containing one
connection-definition, containing multiple
connectiondefinition-instance elements (each for a separate database
or whatever the resource adapter connects to)
3) Create multiple geronimo-ra.xml files and deploy them each
separately:
java -jar bin/deployer.jar deploy foo.rar geronimo-ra-1.xml
java -jar bin/deployer.jar deploy foo.rar geronimo-ra-2.xml
java -jar bin/deployer.jar deploy foo.rar geronimo-ra-3.xml
...
Of the three approaches, I think the last is the best in that you can
start and stop and manage each of the configurations independently.
However the first two let you combine your configurations into one
deployment unit if you'd prefer to manage them all together (and would
also let you pack the geronimo-ra.xml file into the RAR if you'd
prefer to).
Thanks,
Aaron
On 1/8/06, Michael Allman <[EMAIL PROTECTED]> wrote:
My question (below) didn't seem to make it to the list, so I'm
resending
it. Apologies if this results in a duplicate.
---------- Forwarded message ----------
Date: Sat, 7 Jan 2006 20:06:34 -0500 (EST)
From: Michael Allman <[EMAIL PROTECTED]>
To: user@geronimo.apache.org
Subject: deploying a resource adapter
Hello,
How do I configure several connection factories for a single (outbound)
resource adapter in Geronimo 1.0?
In JBoss 4, I copy a rar file into the "deploy" directory, and then I
copy a
bunch of -ds.xml files into the same directory. Each -ds.xml
references the
same rar file.
Thank you.
Michael