Hello Kevin:

Thanks Kevin, so, now I put on my hivemodule file this

 <contribution configuration-id="tapestry.state.ApplicationObjects">
    <state-object name="Logger" scope="application">
       <create-instance class="org.apache.commons.logging.Log"/>
    </state-object>
 </contribution>

I has a doubt about the create-instance part because commons-logging has its own LogFactory, and other doubt is about how I can set the properties file maybe (follow the example) <create-instance class="org.apache.commons.logging.Log, log4j.configuration=/WEB-INF/classes/log4jproperties.xml"/>?

My .java parent page

   @InjectState("Logger")
   protected abstract Log getLogger();

But now, my app complaint and show this message on the child page (even if I inject directly on MainForm.java)

Error at context:/WEB-INF/MainForm.page, line 5, column 50: Method 'protected abstract org.apache.commons.logging.Log com.pct.SIG.MainPadre.getLogger()' (declared in class com.pct.SIG.MainPadre) has no implementation in class com.pct.SIG.MainForm (or enhanced subclass $MainForm_22).
location:       context:/WEB-INF/MainForm.page, line 5, column 50
1       <?xml version="1.0" encoding="UTF-8"?>
2       <!DOCTYPE page-specification PUBLIC
3       "-//Apache Software Foundation//Tapestry Specification 4.0//EN"
4       "http://jakarta.apache.org/tapestry/dtd/Tapestry_4_0.dtd";>
5       <page-specification class="com.pct.SIG.MainForm">
6       


What I'm doing wrong?, because I don't have enough experience managing hivemind

Thanks

Kevin Menard escribió:
Hi Jorge,

It seems to me that an ASO would be your best bet. Give it an application scope and you'll only create a single instance for the life of your app. If you need to do some funky configuration when starting, then you can create a StateObjectFactory wrapper. A service would really only be necessary if you were looking to write some sort of facade, and even then, I'm not sure it'd gain you a whole lot. If you're looking to do it a bit more dynamically, you could look into using aspectj to hook in as appropriate.

Hope that helps.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to