You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Roberto Mabini <Ro...@headstrong.com> on 2009/04/23 04:26:32 UTC

Injecting Object in Action class good priactise ? or bad practise

Hi !
Can you help me with my design . I am using strurts 2 right now with spring jpa hibernate. I am currently having problem with my application

I getting error when I tried inserting data into my registration. The error say something about detached object. Well the thinks is. I have injected my

domain or my Entity inside the action Class using application context . but I set this up using a prototype scope. Is this a good practice ? or should I

create the object entity inside the action Class using the new Operator?.

Thanks I hope u understand my question

Best Regards
Roberto


________________________________
***The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review,retransmission,dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.***