you have to use an interface for this to work Encoder + EncoderImpl
@Scope(IOCConstants.PERTHREAD_SCOPE) public Encoder buildEncoder() { System.out.println("new Encoder()...*****************************"); return new EncoderImpl(); } there is probably a warning in the log somewhere Davor Hrg On Jan 3, 2008 10:49 AM, Donyee <[EMAIL PROTECTED]> wrote: > I want to create a new object per request, and my code is like: > > @Scope(IOCConstants.PERTHREAD_SCOPE) > public Encoder buildEncoder() { > System.out.println("new Encoder()...*****************************"); > return new Encoder(); > } > > when i request my page with IE and FireFox, > the output is "new Encoder()...*****************************", only print > once! > is there anything wrong with my code? > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]