Hey

I'm still trying to get Castor to work in an EJB environment, especially 
getting Castor to let me resolve EJB2EJB references, but no luck.

Here's what I have:
Bean A has a public field that references a Bean B. The XML for A 
contains the id/primary key to B. So, when Castor is loading the XML I 
want it to ask my code "what should this id thingy be resolved to", 
preferably using the IDResolver interface.

Here's my current mapping:
<mapping>
    <class name="com.tss.forum.ejb.bean.ForumBMP" identity="id">
       <map-to xml="forum"/>
       <field name="category"
                           type="com.tss.forum.ejb.interfaces.Category"
                           direct="true">
          <bind-xml reference="true" name="category" node="attribute"/>
       </field>
    </class>
</mapping>
(other fields removed for simplicity)

Here's an XML example:
<forum id="urn:forum:test" category="foo:bar">
</forum>
--

This doesn't work at all. So:
1) What are the rules for invocation of IDResolver?
2) Is this possible to accomplish?
2a) If no, then why?
2b) If yes, then how? Can I change the code to do it?

Hasn't anyone else run into this problem before? It seems like the first 
thing you'd do with Castor XML and EJB...

regards,
   Rickard

-- 
Rickard �berg
Author of "Mastering RMI"
Chief Architect, TheServerSide.com
   The Middleware Company - We Build Experts!

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to