This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Spring and the fly likes Modify Constructor Argument in Construction injuction in spring POJO withou modify java. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "Modify Constructor Argument in Construction injuction in spring POJO withou modify java." Watch "Modify Constructor Argument in Construction injuction in spring POJO withou modify java." New topic
Author

Modify Constructor Argument in Construction injuction in spring POJO withou modify java.

Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 387
In future customer don't want to compiling the java file , can we change the no of argument in Pojo class of spring.

i mean to say constructor injection argument can we modify without compiling the java class.
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

Prabhat Ranjan wrote:In future customer don't want to compiling the java file , can we change the no of argument in Pojo class of spring.

i mean to say constructor injection argument can we modify without compiling the java class.


You question isn't quite clear what you mean.

Regardless of Spring, if I have a class with a constructor that takes 2 arguments, and I want to change it to 3 arguments, then I have to change the Java code. Any change to Java code requires a recompile.

Now there are libraries like JavaAssist that can add code to classes at runtime.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Prabhat Ranjan
Ranch Hand

Joined: Oct 04, 2006
Posts: 387
if not possible then its fine , as someone has asked me i said the same thing in interview.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Modify Constructor Argument in Construction injuction in spring POJO withou modify java.
 
Similar Threads
what is POJO?
instanceof problem
Design issue (POJO and DTO/VO)
Difference Between java bean And POJO