Hello all,
As for the init() discussion, I understand the reason for ColdSpring
not to call superclass init methods by itself. And I pretty much agree
with that point of view. So consider that issue as resolved.
As for the second issue: I'm using the bleeding edge and I traced the
cause of the issue.
The problem only occurs in subapps that use a bean which is defined in
a parent services.xml.
Since the method 'containsBean' in DefaultXmlBeanFactory doesn't check
its parent anymore (The code that does, is commented out. Another
earlier discussion I missed? :) ), coldspringPlugin.cfc will call
findBeanNameByType (line 162). And here is where things go wrong, since
obviously the extended component type differs from the original
component type.
Help?
Regards,
Ruud
Dave Ross schreef:
Ruud,
We've wavered on the calling init() on a superclass "debate" for
a while - it sounds like people expect ColdSpring to do this - which I
understand. Maybe my resistance was based on the fact that I have yet
to write a CFC without an init method in my mind - concrete classes
have constructors, period. This has been discussed in the past for
those interested (
http://www.mail-archive.com/[email protected]/msg00206.html)
So I've created two tickets:
Please, anyone interested in these features create an account on
our issue tracker and vote for them. This will give us an idea on
prioritization.
As for your second issue - post your bean definition xml and an
example setter-method constructor arg. lso are you using bleeding edge
or 0.5.0?
thanks,
Dave
On 5/4/06, Ruud
Hermans <[EMAIL PROTECTED]>
wrote:
Hi
there,
For a while now, I'm using coldsping & machII in my app, which uses
a
standard (= non application specific) AuthenticationService.cfc to do
all its authentication stuff. Works like a charm.
However, today I needed to add some application specific logic, so I
extended AuthenticationService.cfc and referred to the extending cfc in
my services.xml. Now nothing works. :(
There seem to be 2 issues here:
- AuthenticationService.cfc (the original) has an init method that takes
some arguments, which are kindly supplied by coldspring. If I put in
ExtendedAuthenticationService.cfc, which doesn't override the init
method, colspring seems to think there's no more init method and
therefore the arguments aren't provided.
If I override the init method with an init method that contains nothing
but super.init(argumentCollection=arguments), it works again. Though
something tells me I shouldn't have to do this extra step.
- Second issue: every other component that receives
AuthenticationService as an argument from coldspring, doesn't receive
the extended version. I assume there's some type checking going on in
coldspring, before providing an argument. So I guess extended cfc's are
not accounted for here.
Hope someone can help me out here.
Regards,
Ruud Hermans
|