Railo 3.0 and Transfer ORM

15 views
Skip to first unread message

Shawn

unread,
Oct 1, 2008, 10:39:19 AM10/1/08
to transfer-dev
Currently I'm attempting to set up a testbed for Railo and downloaded
the free 3.0 edition. Back in 2007, when Railo was in 2.0, I remember
hearing from both Mark and from Gert that Transfer ORM support was
'coming'.

So here it is, 2008, Railo is in version 3.0 (with an open source 3.1
version on the way) and I can tell you for a fact that Transfer is not
working on the Railo server (but runs just fine on my MBP and on the
live server which runs CF8).

So what's the deal with Railo? Will that support /ever/ come? What's
happening recently with that? It's been quite awhile now, with a lot
of promises (mostly on Railo's side, I understand there's only so much
that Mark can do), but still no working Transfer ORM.

Chris Peterson

unread,
Oct 1, 2008, 10:57:56 AM10/1/08
to transf...@googlegroups.com
all you have to do is work up a new java loader and you should be good, I think thats the only thing that makes Transfer not work in Railo, and (from memory) thats because it uses internal coldfusion API objects / methods.  Write one from scratch and rock out buddy!

Chris Peterson
--
Hey! I dont tell you how to tell me what to do, so dont tell me how to do what you tell me to do! ~ Bender (Futurama)

Shawn

unread,
Oct 1, 2008, 11:12:44 AM10/1/08
to transfer-dev
Write my own java loader? Uh, okay...

The thing is, I was hoping there'd be more seamless integration than
that. I'm running CF8 on live and local (as I said), so I was hoping
I wouldn't have to hack transfer to get it to work with Railo--my
initial question was whether or not the work has already been done
somehow and if I'm missing something.

If creating a new java loader is so easy, why hasn't it been done
before now?

Chris Peterson

unread,
Oct 1, 2008, 11:14:14 AM10/1/08
to transf...@googlegroups.com
I never said it was easy =)  But at least its a goal rather than an unknown!

Chris

Shawn

unread,
Oct 1, 2008, 11:21:59 AM10/1/08
to transfer-dev
If I wasn't already working on a huge project that's currently past
deadline...maybe I'd do that. :)

Sounds like the answer to what I'm asking is 'No, still no support for
Railo in transfer ORM'. Disappointing, but oh well.

rdme...@googlemail.com

unread,
Oct 1, 2008, 12:39:08 PM10/1/08
to transf...@googlegroups.com
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....@gmail.com>

Shawn

unread,
Oct 1, 2008, 1:27:55 PM10/1/08
to transfer-dev
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>

Shawn

unread,
Oct 1, 2008, 1:41:44 PM10/1/08
to transfer-dev
Hrm. FYI, the EventType composition problem is my issue, so ignore
that one.

My real question is: Why the difference in implementation? Why is it
that a transfer.xml file parsed just fine by CF8 suddenly runs into
recursion issues on Railo? Why should I have to edit a file that
works just fine so that it will work on Railo? I really don't get it.
> ...
>
> read more »

Chris Peterson

unread,
Oct 1, 2008, 1:58:24 PM10/1/08
to transf...@googlegroups.com
yea, something about that composition seems fishy to me, maybe make sure that the file versions that are being parsed are *really* the same (check trusted cache, re-start CF / Railo services, check for any mappings that may not be the same)

I think there is something else missing from this picture.

Chris

Shawn

unread,
Oct 1, 2008, 2:09:29 PM10/1/08
to transfer-dev
They are identical. I'm using SVN to update them. I can take
lazy="true" off of all my Site relationships, and everything runs just
fine (on CF8).

The 'Type' compositions for ContactType and from Address, Phone, Email
to ContactType have never been a problem. Bear in mind, I just set up
Railo /yesterday/. So the only code it has on it came directly from
SVN--that's how it got there in the first place. Same config--runs
one way on CF8, runs differently on Railo.

I'm using Mach-II, and both my CS serviceFactory and Transfer are
being reloaded (and the entire Transfer cache gets dumped) when
reinit=1 (I'm doing my own custom implementation of coldSpring with
Mach-II). But just to cover my bases, I restarted the Railo server
(because it restarts so fast) a few times already, and no change.

On Oct 1, 12:58 pm, "Chris Peterson" <overrid...@gmail.com> wrote:
> yea, something about that composition seems fishy to me, maybe make sure
> that the file versions that are being parsed are *really* the same (check
> trusted cache, re-start CF / Railo services, check for any mappings that may
> not be the same)
>
> I think there is something else missing from this picture.
>
> Chris
>
> ...
>
> read more »

Mark Mandel

unread,
Oct 1, 2008, 5:38:28 PM10/1/08
to transf...@googlegroups.com
That is interesting.

Honestly, I've not looked at Railo3 yet (although it is on my todo
list, however it is a LONG todo list).

At some point, I will need to sit down and run all the unit tests on
Railo, and see what happens.

Mark
--
E: mark....@gmail.com
W: www.compoundtheory.com

Shawn

unread,
Oct 1, 2008, 10:44:31 PM10/1/08
to transfer-dev
If the rumor holds true, Railo 3.1 is coming out in November. You
might as well wait until then, if that's the case.

On Oct 1, 4:38 pm, "Mark Mandel" <mark.man...@gmail.com> wrote:
> That is interesting.
>
> Honestly, I've not looked at Railo3 yet (although it is on my todo
> list, however it is a LONG todo list).
>
> At some point, I will need to sit down and run all the unit tests on
> Railo, and see what happens.
>
> Mark
>
> ...
>
> read more »

Sean Corfield

unread,
Oct 12, 2008, 12:00:52 PM10/12/08
to transf...@googlegroups.com
On Wed, Oct 1, 2008 at 7:44 PM, Shawn <shawn....@gmail.com> wrote:
> If the rumor holds true, Railo 3.1 is coming out in November. You
> might as well wait until then, if that's the case.

It's not a rumor, Railo has publicly stated the schedule as being end
of November for 3.1 - the first open source release - and summer 2009
for Railo 3.2 which will have Hibernate integration, following Adobe's
lead from Centaur.

It would be a big help to Mark if someone were willing to step up and
assist with the Railo port - and the first step would be to run the
(extensive) Transfer test suite on Railo 3.0 on both the Express and
Community edition (to at least create a baseline indicating any
differences - although I suspect support will focus on Community
edition). It would be good to start now on 3.0 so that Gert et al are
aware of any issues that could possibly be corrected in 3.1 to make
life easier.
--
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/

"If you're not annoying somebody, you're not really alive."
-- Margaret Atwood

Mark Mandel

unread,
Oct 12, 2008, 5:17:06 PM10/12/08
to transf...@googlegroups.com
For sure!

If anyone wants to help out with this, I'm all ears! (and hands... for
typing, you know).

Mark

--
E: mark....@gmail.com
W: www.compoundtheory.com

Devon Burriss

unread,
Oct 13, 2008, 5:52:14 AM10/13/08
to transfer-dev
Heya I'm using Railo 3.0 for some stuff so let me know what needs
doing and I'll try schedule it in between my 2 jobs :)
Devon
On Oct 12, 11:17 pm, "Mark Mandel" <mark.man...@gmail.com> wrote:
> For sure!
>
> If anyone wants to help out with this, I'm all ears! (and hands... for
> typing, you know).
>
> Mark
>
>
>
> On Mon, Oct 13, 2008 at 3:00 AM, Sean Corfield <seancorfi...@gmail.com> wrote:
>
> > On Wed, Oct 1, 2008 at 7:44 PM, Shawn <shawn.grig...@gmail.com> wrote:
> >> If the rumor holds true, Railo 3.1 is coming out in November.  You
> >> might as well wait until then, if that's the case.
>
> > It's not a rumor, Railo has publicly stated the schedule as being end
> > of November for 3.1 - the first open source release - and summer 2009
> > for Railo 3.2 which will have Hibernate integration, following Adobe's
> > lead from Centaur.
>
> > It would be a big help to Mark if someone were willing to step up and
> > assist with the Railo port - and the first step would be to run the
> > (extensive) Transfer test suite on Railo 3.0 on both the Express and
> > Community edition (to at least create a baseline indicating any
> > differences - although I suspect support will focus on Community
> > edition). It would be good to start now on 3.0 so that Gert et al are
> > aware of any issues that could possibly be corrected in 3.1 to make
> > life easier.
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > An Architect's View --http://corfield.org/
>
> > "If you're not annoying somebody, you're not really alive."
> > -- Margaret Atwood
>
> --
> E: mark.man...@gmail.com
> W:www.compoundtheory.com

Gert - Railo

unread,
Nov 25, 2008, 10:19:06 AM11/25/08
to transfer-dev
Hi all,

Transfer ORM should run on Railo 3.0.1.x. Luis Majano has tested
Canvas Wiki against it lately. And as far as I know there are only the
following known issues:

Quote from Luis:

"1) Transfer cannot validate the datasource.xml with the
datasource.xsd, I have no clue why. I had to turn xsd validation off
in transfer in order for this to work.
2) Diff plugin does not work on railo. The diff.cfc plugin compares
two strings and produces an array of differences. I will investigate
why. The end result for the comparions in railo are completely empty."

We will look into it and fix it if there are any Railo errors.

Besides that. As I already posted in my blog:

"Well, I can already say that we will NOT announce the Open Source
version on the CFCamp. But we will release an Open Source Version
still this year. It will not be the final one but maybe an early
alpha. I will anounce it on my blog asap.
Since we cannot make a first impression twice we would rather make it
a good one... That's why we are taking our time."

Hope that helps.

Gert
Reply all
Reply to author
Forward
0 new messages