No problem. Cool thanks. Is there not a way to just inject that object
or is that now a good approach?

James Carman wrote:
> I apologize.  I only saw the first part of your hivemodule.xml stuff.  Yeah,
> that's an ASO alright! :-)  You can look it up via the
> ApplicationStateManager.  Just provide a setter for an
> ApplicationStateManager in your engine service and HiveMind will autowire it
> for you.  Then, you can look up your ASO by name.
>
>
> -----Original Message-----
> From: Stanczak Group [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, March 29, 2006 11:57 AM
> To: Tapestry users
> Subject: Re: Accessing a Session from a Service?
>
> Isn't that what I posted? Doesn't that make it an ASO?
>
> <contribution configuration-id="tapestry.state.ApplicationObjects">
>         <state-object name="login_session" scope="session">
>             <create-instance class="com.collegevitae.LoginSession"/>
>         </state-object> 
>     </contribution>
>
>
> James Carman wrote:
>   
>> You can look up ASOs using the ApplicationStateManager.  Is your
>> login_session an ASO?
>>
>> -----Original Message-----
>> From: Stanczak Group [mailto:[EMAIL PROTECTED] 
>> Sent: Wednesday, March 29, 2006 11:44 AM
>> To: Tapestry users
>> Subject: Accessing a Session from a Service?
>>
>> I have a IEngineService that I've created and I'd like to access the
>> login session session to check permissions. How do I do this?
>>
>> I have to following config in hivemodule.xml.
>>
>> This is the service I want to inject the session state object
>> login_session into:
>>
>> <service-point id="fileDownloadService"
>> interface="org.apache.tapestry.engine.IEngineService">   
>>         <invoke-factory>
>>             <construct class="com.collegevitae.vitae.FileDownloadService">
>>                 <set-object property="response"
>> value="infrastructure:response"/>
>>                 <set-object property="linkFactory"
>> value="infrastructure:linkFactory"/>
>>                 <set-object property="loginSession"
>> value="app-property:login_session"/>## This was what I added, but
>> returns null object.
>>             </construct>
>>         </invoke-factory>
>>     </service-point>
>>
>>
>> This is what I want access to for that users session:
>>
>> <contribution configuration-id="tapestry.state.ApplicationObjects">
>>         <state-object name="login_session" scope="session">
>>             <create-instance class="com.collegevitae.LoginSession"/>
>>         </state-object> 
>>     </contribution>
>>
>>   
>>     
>
>   

-- 
Justin Stanczak
Stanczak Group
812-735-3600

"All that is necessary for the triumph of evil is that good men do nothing."
Edmund Burke

..________...............__.................
./  _____/..____..._____/..|_..____...____....
/...\..____/.__.\./....\...__\/.._.\./._..\....
\....\_\..\..___/|...|..\..|.(..<_>.|.<_>..)....
.\______../\___.._\__|../__|..\____/.\____/......
........\/.....\/.....\/..........................


-- 
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.


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

Reply via email to