You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Oscar Picasso <os...@yahoo.com> on 2006/02/21 14:48:12 UTC
State object and hivemind trouble
Hi,
I am still trying to understand how to configure an application state object in hivemind.
I have an AccessManagerProvider class with a two parameters constructor. Currently it is configured as a service and injected into the pages that need it.
It works fine.
I find more appropriate to use this same class as an application state object but I am not able to find the right hivemind configuration.
- if I use the same invoke-factory that I use with the service I get an Exception.
- I have tried to implement a StateObjectFactory which create the object and configure it with:
<invoke-factory service-id="org.jop.web.DaoManagerProviderStateObjectFactory">
but I get another Exception:
...Attribute 'service-id' is not defined in the schema. Attribute 'object' is required but no value was provided.
I am lost here.
Can someone give me a complete example of how to configure an application state object with a constructor that takes (a) parameter(s)?
Thanks.
Oscar
Below the service hivemind fragment that works fine.
...
<service-point id="DaoManagerProvider" interface="org.jop.dao.DaoManagerProvider">
<interceptor service-id="hivemind.LoggingInterceptor"/>
</service-point>
<implementation service-id="DaoManagerProvider">
<invoke-factory>
<construct class="org.jop.cayenne.access.AccessManagerProvider">
<string>ProductionDomain</string>
<int>10</int>
</construct>
</invoke-factory>
</implementation>
...
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
RE: State object and hivemind trouble
Posted by James Carman <ja...@carmanconsulting.com>.
Do you have to use constructor parameters?
-----Original Message-----
From: Oscar Picasso [mailto:oscgoogle@yahoo.com]
Sent: Tuesday, February 21, 2006 8:48 AM
To: tapestry-user@jakarta.apache.org
Subject: State object and hivemind trouble
Hi,
I am still trying to understand how to configure an application state object
in hivemind.
I have an AccessManagerProvider class with a two parameters constructor.
Currently it is configured as a service and injected into the pages that
need it.
It works fine.
I find more appropriate to use this same class as an application state
object but I am not able to find the right hivemind configuration.
- if I use the same invoke-factory that I use with the service I get an
Exception.
- I have tried to implement a StateObjectFactory which create the object and
configure it with:
<invoke-factory
service-id="org.jop.web.DaoManagerProviderStateObjectFactory">
but I get another Exception:
...Attribute 'service-id' is not defined in the schema. Attribute 'object'
is required but no value was provided.
I am lost here.
Can someone give me a complete example of how to configure an application
state object with a constructor that takes (a) parameter(s)?
Thanks.
Oscar
Below the service hivemind fragment that works fine.
...
<service-point id="DaoManagerProvider"
interface="org.jop.dao.DaoManagerProvider">
<interceptor service-id="hivemind.LoggingInterceptor"/>
</service-point>
<implementation service-id="DaoManagerProvider">
<invoke-factory>
<construct class="org.jop.cayenne.access.AccessManagerProvider">
<string>ProductionDomain</string>
<int>10</int>
</construct>
</invoke-factory>
</implementation>
...
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
RE: State object and hivemind trouble
Posted by James Carman <ja...@carmanconsulting.com>.
Try this...
<invoke-factory
object="service:org.jop.web.DaoManagerProviderStateObjectFactory" />
-----Original Message-----
From: Oscar Picasso [mailto:oscgoogle@yahoo.com]
Sent: Tuesday, February 21, 2006 8:48 AM
To: tapestry-user@jakarta.apache.org
Subject: State object and hivemind trouble
Hi,
I am still trying to understand how to configure an application state object
in hivemind.
I have an AccessManagerProvider class with a two parameters constructor.
Currently it is configured as a service and injected into the pages that
need it.
It works fine.
I find more appropriate to use this same class as an application state
object but I am not able to find the right hivemind configuration.
- if I use the same invoke-factory that I use with the service I get an
Exception.
- I have tried to implement a StateObjectFactory which create the object and
configure it with:
<invoke-factory
service-id="org.jop.web.DaoManagerProviderStateObjectFactory">
but I get another Exception:
...Attribute 'service-id' is not defined in the schema. Attribute 'object'
is required but no value was provided.
I am lost here.
Can someone give me a complete example of how to configure an application
state object with a constructor that takes (a) parameter(s)?
Thanks.
Oscar
Below the service hivemind fragment that works fine.
...
<service-point id="DaoManagerProvider"
interface="org.jop.dao.DaoManagerProvider">
<interceptor service-id="hivemind.LoggingInterceptor"/>
</service-point>
<implementation service-id="DaoManagerProvider">
<invoke-factory>
<construct class="org.jop.cayenne.access.AccessManagerProvider">
<string>ProductionDomain</string>
<int>10</int>
</construct>
</invoke-factory>
</implementation>
...
---------------------------------
Yahoo! Mail
Use Photomail to share photos without annoying attachments.
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org