Hello all,
Please forgive me as this is my first post to this list and being that I am
very new at EJB's, I may not explain my situation as clearly as possible,
but I will do my best. That said, I am having some issues deploying some
entity beans to Weblogic 5.1 (EJB 1.1) which has some object reference.
Basically I have 3 entity beans:
Client (ClientHome.java, ClientBean.java, Client.java)
Address (AddressHome.java, AddressBean.java, Address.java)
Phone (PhoneHome.java, PhoneBean.java, Phone.java)
Address and Phone both contain a reference to a Client EJB Object
(package.Client) and I would like to persist the primary key of Client
(java.lang.String) in both the "phone" and "address" tables. I would also
like to implement some finders in both Address and Phone:
public Collection findByClient(Client client) . . .
public Collection findByName(String name) . . .. where name is a part of
Client
I have had some success doing this type of object reference using
orionserver, but I am not nearly as familiar with how weblogic implements
the 1.1 spec.
In using the deploy tool, I cannot figure out how to get my finder methods
to work properly. In my package.Client object (remote interface) I have a
method getClientId(). In the finder method I have the following
information:
package.Client $0
(= client $0)
@0.getClientId() java.lang.String
I have tried a number of different expressions with no luck. . . I get
miscellaneous exceptions when attempting to generate the container. I had
tried
@0.clientId
which failed but did not throw an exception. . . the deploy tool actually
mentioned that cliendId did not exist in the remote interface (obviously)
but that felt like a step in the right direction (replace an exception with
an understandable error message sounds good to me) :).
My goal is to have the container manage the "foreign keys" which are
represented by the references to the EJB object (remote interface) and be
able to set, get, persist, and perform finds based on the object. My
understanding is the container will take the responsiblity of converting
these references to the appropriate primary keys (in this case they are all
String objects) and persist accordingly.
I believe my ejb references were set up correctly (to the best of my
ability). . . .so that doesnt seem to be a problem.
If anyone can steer me in the right direction, I would be greatly
appreciative. . . I have scanned the archives for this issue with little
luck in finding a resolution so hopefully I am not asking something that has
been asked a hundred times before.
Thanks in advance :)
Jeff
===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff EJB-INTEREST". For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".