--- David Jencks <[EMAIL PROTECTED]> wrote:
> Having 2 geronimo servers communicating by corba is definitely possible
> and you will be able to configure all the necessary parts using gbeans.
> This would be the easiest to set up in my opinion. In particular you
> should be able to do this now with the existing configurations and
> plans, without waiting for me to fix the ClientCORBA plan. I was
> suggesting that you have ejbs deployed on a geronimo server and have
> the client be a j2ee application client, running in the geronimo
> application client container. The geronimo app client container is a
> stripped down version of geronimo that includes the kernel, the gbean
> machinery, the transaction manager, and a few other pieces, but not
> ejbs or web apps. Since it includes the kernel it is fairly easy to
> run components in it as gbeans. This is what I was suggesting.
> To use an ejb from a j2ee application (such as a j2ee app client, web
> app, or ejb) you need to include in the geronimo/openejb plan ejb-ref
> information like this:
> 1. where the naming server is and the name
> 2. a css-link to supply the security info for csiv2 negotiation with
> the server. A typical element might look like this:
>
> <ejb-ref>
> <ref-name>ejb/Control</ref-name>
> <ns-corbaloc>corbaloc::<target name service host>:<name
> service port>/NameService</ns-corbaloc>
> <name>targetEjbName</name>
> <css-link>SSLClientCert</css-link>
> </ejb-ref>
> (fill in the correct values for the host and port)
I tried to have the J2EE client and EJB on different machines, but it didn't
work. On
the client machine, I tried to deploy magicGball-client.jar with the following
geronimo
application deployment plan:
<application-client
xmlns="http://geronimo.apache.org/xml/ns/j2ee/application-client"
configId="client"
clientConfigId="org/acme/MagicGBall/Client"
clientParentId="org/apache/geronimo/ClientCorba">
<ejb-ref>
<ref-name>mGBall</ref-name>
<ns-corbaloc>corbaloc::<ServerIPAddressHere>:1050/NameService</ns-corbaloc>
<name>MagicGBall</name>
<css-link>SSLClientPassword</css-link>
</ejb-ref>
<realm-name>geronimo-properties-realm</realm-name>
<callback-handler>org.acme.MagicGBallCallbackHandler</callback-handler>
</application-client>
However, when I tried to deploy it I got the following error:
C:\svn\server\trunk\geronimo\modules\assembly\target\geronimo-1.0-M5>java -jar b
in\deployer.jar --user system --password manager distribute C:\svn\server\trunk\
geronimo\applications\magicGball\target\magicGball-client.jar C:\svn\server\trun
k\geronimo\applications\magicGball\src\resources\geronimo-application-client.xml
Error: Operation failed: Could not find an EJB for reference mGball
to a remote session bean that has the home interface
org.acme.MagicGBallHome and the remote interface org.acme.MagicGBall
Here's my application client xml plan ( commented out <ejb-link>):
<application-client xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/applicationclient_1_4.xsd"
version="1.4">
<display-name>Magic G Ball</display-name>
<ejb-ref>
<ejb-ref-name>mGball</ejb-ref-name>
<ejb-ref-type>Session</ejb-ref-type>
<home>org.acme.MagicGBallHome</home>
<remote>org.acme.MagicGBall</remote>
<!-- ejb-link>magicGball-ejb.jar#MagicGBall</ejb-link -->
</ejb-ref>
</application-client>
If I deploy the magicgball ear file on both client and server machines and
execute the
client from the client machine, the magicGball EJB on the client machine gets
invoked. I
know this because I had each machine print out in the answer from
MagicGBallBean ask
method.
> If your j2ee component is running in a server (it is a web app or ejb),
> you should include the ServerCORBA configuration as a parent, just like
> for a server ejb. If your j2ee component is an app client, which runs
> in a different jvm, you should include the ClientCORBA configuration.
> Unfortunately the clientCORBA configuration is still incomplete: you
> need some security gbeans.
thanks,
Lin
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com