What if a have to search for the child records.
I have emplemented it by this way
I have created an ejbSelectChildRecords
<query>
<description>Find All childs</description>
<query-method>
<method-name>ejbSelectSolutiond</method-name>
<method-params/>
</query-method>
<ejb-ql>
<![CDATA[SELECT solutionds FROM SolutionBean s ]]>
</ejb-ql>
</query>
that return a Collection of remote object of the child records and I called
that ejbSelect from another method
Hemant Khandelwal wrote:
> Firstly, a getter method should be declared to return non-void value.
>
> If you are doing something like this in the Remote Interface
>
> public Collection getSolutionds() throws
> RemoteException;
>
> is not allowed.
>
> The method will return a Collection whose implementation is provided by the
> Persistence Manager. This Collection should not be exposed in a
> RemoteInterface. i.e. accessor method ("get" and "set") for
> Collection-valued cmr-fields should not be exposed in Remote Interface.
>
> See section 9.4.6 and 9.4.8 of EJB 2.0, Proposed Final Draft.
>
> Hemant
> ServerTeam,
> Pramati Technologies
> www.pramati.com
>
> ----- Original Message -----
> From: "SoftFrance MOODAD Shadi" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Monday, February 05, 2001 8:02 PM
> Subject: exception when seaching child records in an entity bean
>
> Hi every body
>
> My problem:
>
> I'm trying to find the child record related to an entity in a
> one-to-many relationship(Solution-->SolutionDetail)
> I have the following method in the Solution remoteInterface
> public void getSolutionds(Collection solutionds) throws
> RemoteException;
>
> and i have the folowing relationship descriptor in the ejb-jar.xml
>
> <ejb-relation>
> <ejb-relation-name>SolutionDetail</ejb-relation-name>
> <ejb-relationship-role>
>
> <ejb-relationship-role-name>solutiond-belongto-solutionh</ejb-relationship-r
> ole-name>
>
> <multiplicity>many</multiplicity>
> <role-source>
> <ejb-name>Solutiond</ejb-name>
> </role-source>
> <cmr-field>
> <cmr-field-name>solutionh</cmr-field-name>
> </cmr-field>
> </ejb-relationship-role>
> <ejb-relationship-role>
>
> <ejb-relationship-role-name>solutionh-has-solutiond</ejb-relationship-role-n
> ame>
>
> <multiplicity>one</multiplicity>
> <role-source>
> <ejb-name>Solution</ejb-name>
> </role-source>
> <cmr-field>
> <cmr-field-name>solutionds</cmr-field-name>
> <cmr-field-type>java.util.Collection</cmr-field-type>
> </cmr-field>
> </ejb-relationship-role>
> </ejb-relation>
>
> the deployment (under beaWebLogic 6.0) succed but if i use that relation
> and the the method "mentioned above" i get a run time execution error
>
> java.rmi.MarshalException: error marshalling return; nested exception
> is:
> java.io.NotSerializableException:
> solution.SolutionBean_WebLogic_CMP_RDB
> MS_solutionds_Set
> java.io.NotSerializableException:
> solution.SolutionBean_WebLogic_CMP_RDBMS_solut
> ionds_Set
> <<no stack trace available>>
>
> thanks a lot for a help
>
> ===========================================================================
> 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".
>
> ===========================================================================
> 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".
===========================================================================
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".