On Thu, Jul 31, 2008 at 9:00 PM, Edward Yakop <[EMAIL PROTECTED]>wrote:
> On Fri, Aug 1, 2008 at 5:24 AM, Richard Wallace > <[EMAIL PROTECTED]> wrote: > > Cool. I just committed some things. I made the commit message pretty > > detailed so you can easily see what's going on. I'll update the example > > project later to make use of that stuff. > Excellent. > > > I've also got a PackageProvider that will scan and for Composites that > also > > implement the Action interface or end in Action that I can commit, > > but I have to figure out how to get it working properly in a typical > webapp > > deployment scenario. > > Is this committed? Coz I can't find the class in qi4j-struts2-plugin. > Nope, I haven't committed this yet as I'm still trying to figure out exactly how to get it integrated. > > > Right now I have it working where the PackageProvider expects an > > ActionConfiguration object to be injected and the ActionConfiguration is > > created during the creation of the layers and modules of the qi4j > application so it > > can also add what it finds as composites. > > I'm not sure what this paragraph means as I'm a total struts 2 newbie > (This is my first time using struts 2). Basically what I'm talking about is the stuff in Struts that allows you to just tell it what package the actions are in and then it will autodetect them. The class that does this is the ClasspathPackageProvider. It has a few problems when trying to use it with Composites, like it ignores abstract classes (which includes interfaces), and when I overrode that part it broke in another place because when it's trying to build the actions result configuration it tries to traverse the superclasses, but being that it is an interface it gets null and throws a NPE. Without using this you need to configure the actions in explictly in the struts.xml file which is a pain. Also, when finding these Composite actions it adds it to the module so you don't need to explicitly do that either. Like I said, I have this working locally but that's because I'm letting Qi4j manage everything and not doing it as a regular webapp (but more like in Chronos). > > > Now, my feedback on the existing code: > o Qi4jContainerProvider > I would think it's better to use @Structure to inject > ObjectBuilderFactory, CompositeBuilderFactory and > UnitOfWorkFactory instead of @Inject. Ya, I agree. Not sure why I did it that way. Removed. > > o UnitOfWorkInterceptor > I need to investigate when struts 2 rendered the page. Is this done > after action invocation? > If I understand PreListener javadoc correctly, that is Result is > executed outside action execution scope. > We would only be able to pause/complete/discard after result is executed. Ya, the way it's setup now the unit of work is either discarded or completed before the result is created. The main reason I wound up doing it this way was because for some reason I couldn't figure out if I allowed the interceptor to close it when the call stack got back to it, strange things were happening (entities would change and eventually just disappear when viewing the listing page repeatedly). > > > Since we're working on the same code base. We need to divide tasks. > I think I would try to complete Qi4jPropertyAccessor and start > creating test cases. Sounds good. I want to work on getting the Action detection working properly so you don't have to add the composites and objects manually and don't have to configure things in the struts.xml file. Rich > > > Regards, > Edward Yakop > > _______________________________________________ > qi4j-dev mailing list > [email protected] > http://lists.ops4j.org/mailman/listinfo/qi4j-dev >
_______________________________________________ qi4j-dev mailing list [email protected] http://lists.ops4j.org/mailman/listinfo/qi4j-dev

