For a POJO you can use dependency injection such as Spring or Guice or you
can instantiate the object the normal way

BusinessServiceObject bso = new BusinessServiceObject();

in your action class. There is nothing special about accessing your BSO's in
Struts.

Regards,
Randy Burgess
Sr. Web Applications Developer
Nuvox Communications



> From: Frank Fischer <[EMAIL PROTECTED]>
> Reply-To: Struts Users Mailing List <user@struts.apache.org>
> Date: Thu, 13 Mar 2008 22:32:34 +0100
> To: <user@struts.apache.org>
> Subject: How to initialize business service objects?
> 
> Hi all
>  
> i'm just starting with struts2 (even with struts at all). Of course i first
> read some how-to-starts. But there is one thing i don't understand.
>  
> I'm trying to create a simple little chat app. I have two action classes,
> one for the normal chat user, one for the moderators. Both classes need
> access to the same instances of business service classes which mainly hold
> runtime data such as a list of users currently logged in, list of chat rooms
> and so on.
>  
> Now i don't understand (1) where to create/initialize these business logic
> classes and (2) how to get access to them from the action classes.
>  
> I'm very thankful for any hint.
>  
> Thanks a lot
> Frank



This email and any attachments ("Message") may contain legally privileged 
and/or confidential information.  If you are not the addressee, or if this 
Message has been addressed to you in error, you are not authorized to read, 
copy, or distribute it, and we ask that you please delete it (including all 
copies) and notify the sender by return email.  Delivery of this Message to any 
person other than the intended recipient(s) shall not be deemed a waiver of 
confidentiality and/or a privilege.

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

Reply via email to