You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Borut Bolčina <bo...@gmail.com> on 2006/08/29 08:23:26 UTC
ASO class not instantiated
Why on earth is my ASO
<?xml version="1.0"?>
<module id="com.mycompany.posting.application" version="1.0.0">
<contribution configuration-id="tapestry.state.ApplicationObjects">
<state-object name="manager" scope="application">
<create-instance class="
com.mycompany.posting.application.Manager"/>
</state-object>
</contribution>
</module>
not instantiated?
package com.mycompany.posting.application;
import org.apache.log4j.Logger;
public class Manager {
/**
* Logger for this class
*/
private static final Logger logger = Logger.getLogger(Manager.class);
public Manager() {
System.out.println("Manager");
logger.info("Manager start");
}
}
I tried putting hivemodule in several locations, restarting Tomcat each
time. I use Eclipse 3.2, WTP 1.5, Tapestry 4.0.2, Hivemind 1.1.1. The web
context content looks ok to me. I had this working several months ago with
previous t4 web app, that is why I am a bit confused - I don't have many
mileage on T4.
Any suggestions where to look for any misconfiguration? Found no clue in
archives and doc.
Re: ASO class not instantiated
Posted by Borut Bolčina <bo...@gmail.com>.
Thanks Kirby.
Re: ASO class not instantiated
Posted by Richard Kirby <rb...@capdm.com>.
Hi Borut
State objects are not instantiated until they are first accessed. You
need an @InjectState("manager") in, for example, a page.
Cheers
Richard
Borut Bolčina wrote:
> Why on earth is my ASO
>
> <?xml version="1.0"?>
> <module id="com.mycompany.posting.application" version="1.0.0">
> <contribution configuration-id="tapestry.state.ApplicationObjects">
> <state-object name="manager" scope="application">
> <create-instance class="
> com.mycompany.posting.application.Manager"/>
> </state-object>
> </contribution>
> </module>
>
> not instantiated?
>
> package com.mycompany.posting.application;
>
> import org.apache.log4j.Logger;
>
> public class Manager {
> /**
> * Logger for this class
> */
> private static final Logger logger = Logger.getLogger(Manager.class);
>
> public Manager() {
> System.out.println("Manager");
> logger.info("Manager start");
> }
> }
>
> I tried putting hivemodule in several locations, restarting Tomcat each
> time. I use Eclipse 3.2, WTP 1.5, Tapestry 4.0.2, Hivemind 1.1.1. The web
> context content looks ok to me. I had this working several months ago
> with
> previous t4 web app, that is why I am a bit confused - I don't have many
> mileage on T4.
>
> Any suggestions where to look for any misconfiguration? Found no clue in
> archives and doc.
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org