This is the real Railo server, packed with resin. Currently using the
built-in webserver.
I've got a transfer.xml file that runs /just fine/ on CF8. We've had
transfer errors before, but we've fixed them. This same transfer.xml
file, however, running on Railo, generates constant 'endless loop'
warnings. Ie.,:
The structure of your configuration file causes an infinite loop
The object 'address.ContactType' has a recursive link back to itself
through composition 'Type'. You will need to set one of the elements
in this chain to lazy='true' for it to work.
Here's the ContactType definition:
<object name="ContactType" table="contact_type"
decorator="amp.frameworks.transfer.decorator.ContactType">
<id name="contact_type_id" type="numeric" />
<property name="name" type="string" column="name" />
<property name="has_address" type="boolean" column="has_address" /
>
<property name="has_phone" type="boolean" column="has_phone" />
<property name="has_email" type="boolean" column="has_email" />
<property name="isOrg" type="boolean" column="isOrg" />
<property name="site_id" type="numeric" column="site_id" ignore-
insert="true" ignore-update="true" />
<property name="sort" type="numeric" column="sort" />
<manytoone name="Site" lazy="true">
<link to="site.Site" column="site_id" />
</manytoone>
</object>
So, okay, something is calling ContactType through composition.
Currently that's Address, Phone, and Email:
<object name="Address" table="address"
decorator="amp.frameworks.transfer.decorator.Address">
<id name="id" type="numeric" />
<property name="label" type="string" column="label" />
<property name="address1" type="string" column="address1" />
<property name="address2" type="string" column="address2" />
<property name="city" type="string" column="city" />
<property name="province" type="string" column="province" />
<property name="zip" type="string" column="zip" />
<property name="county" type="string" column="county" />
<manytoone name="Type">
<link to="address.ContactType" column="contact_type_id"/>
</manytoone>
<manytoone name="State">
<link to="address.State" column="state_id"/>
</manytoone>
<manytoone name="Country">
<link to="address.Country" column="country_id"/>
</manytoone>
</object>
<object name="Phone" table="phone"
decorator="amp.frameworks.transfer.decorator.Phone">
<id name="id" type="numeric" />
<property name="label" type="string" column="label" />
<property name="number" type="string" column="number" />
<property name="extension" type="string" column="extension" />
<manytoone name="Type">
<link to="address.ContactType" column="contact_type_id"/>
</manytoone>
</object>
<object name="Email" table="email"
decorator="amp.frameworks.transfer.decorator.Email">
<id name="id" type="numeric" />
<property name="label" type="string" column="label" />
<property name="email" type="string" column="email" />
<manytoone name="Type">
<link to="address.ContactType" column="contact_type_id"/>
</manytoone>
</object>
So okay, fine, I'll set all 'Type' composition to lazy="true" (even
though I fail to see /any/ recursion here), let's see how that does...
Oh, great, another infinite loop error:
The object 'site.Site' has a recursive link back to itself through
composition 'Site'. You will need to set one of the elements in this
chain to lazy='true' for it to work
In my app, 'Site' is a very common relationship, because virtually
every table has a site_id. So okay, fine, even though it's completely
unnecessary in CF8, I'll add lazy="true" to every single relationship
to site.Site in my transfer.xml. Let's see what happens there, shall
we?
Okay, great. Got past that error on one page. But what's this?
Another error on my events registration page:
A ManyToOne TransferObject has not been initialised.
In TransferObject 'event.Event' manytoone 'event.EventType' does not
exist, when calling getType()
So here's the event configuration:
<object name="Event" table="event"
decorator="amp.frameworks.transfer.decorator.Event">
<id name="id" type="numeric" />
<property name="name" type="string" column="name" />
<property name="location" type="string" column="location" />
<property name="date_start" type="date" column="date_start" />
<property name="date_end" type="date" column="date_end" />
<property name="description" type="string" column="description" />
<property name="notes" type="string" column="notes" />
<property name="display_public" type="boolean"
column="display_public" />
<property name="display_member" type="boolean"
column="display_member" />
<property name="last_update" type="date" column="last_update" />
<property name="type_id" type="numeric" column="type_id" ignore-
insert="true" ignore-update="true" refresh-insert="true" refresh-
update="true" />
<property name="site_id" type="numeric" column="site_id" ignore-
insert="true" ignore-update="true" />
<property name="custom" type="string" column="custom" />
<property name="max_activities" type="numeric"
column="max_activities" />
<manytoone name="Type">
<link to="event.EventType" column="type_id" />
</manytoone>
<manytoone name="Site" lazy="true">
<link to="site.Site" column="site_id" />
</manytoone>
<!-- getActivityArray() will only pull activities directly linked
to the event, not to other activity groups -->
<onetomany name="Activity" lazy="true">
<link to="event.EventActivity" column="event_id" />
<collection type="struct">
<!-- TODO: This condition currently is not working right. -->
<condition property="parent_id" value="0" />
<key property="id" />
</collection>
</onetomany>
<onetomany name="BillingType" lazy="true">
<link to="event.EventBillingType" column="event_id" />
<collection type="array">
<order property="member_type_id" order="asc" />
</collection>
</onetomany>
</object>
<object name="EventType" table="event_type"
decorator="amp.frameworks.transfer.decorator.EventType">
<id name="id" type="numeric" />
<property name="type_name" type="string" column="type_name" />
<property name="description" type="string" column="description" />
<property name="site_id" type="numeric" column="site_id" ignore-
insert="true" ignore-update="true" />
<manytoone name="Site" lazy="true">
<link to="site.Site" column="site_id" />
</manytoone>
</object>
So I guess I should be more specific. Transfer seems to /work/ with
Railo. But /only/ if you do a lot of debugging of your transfer.xml
file. You use Mach-II or ColdSpring on Railo, and it just 'works'.
The implementation of it doesn't have to be different whether you use
CF7, or CF8 or Railo or BD. But for Railo I've already had to turn
numerous non-problematic relationships to lazy="true" and now I have
an issue where a composition relationship isn't being recognized by
Transfer.
So I guess I was wrong. Transfer is /somewhat/ supported on Railo.
However, I'm not going to take an XML file that works just fine
locally and in production and modify it specifically so it can be run
on Railo--possibly introducing compatibility issues for CF8.
Any thoughts?
On Oct 1, 11:39 am, "
rdmes...@gmail.com" <
rdmes...@googlemail.com>
wrote:
> What´s the problem with Railo and Transfer ORM?
> I guess you have tested it on Railo Express (?)
>
> I tryed Transfer ORM on Railo Express --> no way ... errors while
> instantiating TransferFactory.
> Then i tryed the real Railo server (packaged with Resin) and Transfer worked
> well (no production, only some small tests).
>
> Please test this and post the result ... if you can confirm this, we should
> inform the railo people.
>
> 2008/10/1 Shawn <
shawn.grig...@gmail.com>