Results 1 to 5 of 5
Thread: Spring IoC
- 07-08-2011, 07:59 AM #1
Member
- Join Date
- Dec 2010
- Location
- Bucharest Romania
- Posts
- 40
- Rep Power
- 0
Spring IoC
Hi all, i develop here an app with spring,jpa,struts2, and i use spring to inject my service objects into struts actions using IoC. As i said before i also use jpa (jpa entities), and i do not know if in order to use a entity into a service class i have to inject this entity into service via IoC also, or i should use new keyword. I know that the new keyword is "bad" and should be avoided. Which is the best practice ?
Thank you.
- 07-08-2011, 08:06 AM #2
- Join Date
- Jan 2011
- Location
- Richmond, Virginia
- Posts
- 3,069
- Blog Entries
- 3
- Rep Power
- 7
I don't know spring and I believe much of what your saying is beyond my understanding, but I can't imagine new should ever be avoided, the new keyword is used to instantiate objects in java.
- 07-08-2011, 09:57 AM #3
Moderator
- Join Date
- Apr 2009
- Posts
- 10,481
- Rep Power
- 16
Why did you post this more than once?
It's rude, and can result in people simply ignoring you...
See my reply in the Advanced section.
- 07-08-2011, 10:01 AM #4
Member
- Join Date
- Dec 2010
- Location
- Bucharest Romania
- Posts
- 40
- Rep Power
- 0
Hi, sorry for this, i din not wanted to be rude, but i posted here by mistake and si did not know how to move this to advanced section.
sorry once again.
- 07-08-2011, 10:52 AM #5
- Join Date
- Sep 2008
- Location
- Voorschoten, the Netherlands
- Posts
- 11,406
- Blog Entries
- 7
- Rep Power
- 17
Similar Threads
-
possible overlapping jars in spring annotated mvc/spring security project
By savantics in forum Web FrameworksReplies: 1Last Post: 12-27-2010, 05:21 PM -
spring mvc
By karq in forum Advanced JavaReplies: 0Last Post: 12-13-2010, 04:28 PM -
spring mvc
By jpnr99 in forum New To JavaReplies: 4Last Post: 10-14-2010, 09:58 AM -
EJB 3.0 VS Spring
By nanaji in forum Advanced JavaReplies: 4Last Post: 01-28-2009, 04:58 AM


LinkBack URL
About LinkBacks

Bookmarks