@Test public void testGetObject() throws Exception { Jta.configure(this.transactionManager, this.userTransaction); UserTransaction userTransaction = userTransactionFactoryBean.getObject(); TargetedInvocationHandler<UserTransaction> handler = (TargetedInvocationHandler<UserTransaction>) Proxy.getInvocationHandler(userTransaction); assertNull(handler.getTarget()); userTransaction.getStatus(); assertEquals(this.userTransaction, handler.getTarget()); }
@Override public UserTransaction getObject() throws Exception { return (UserTransaction)Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[] { getObjectType() }, new LazyInitializationHandler()); }
UserTransactionFactoryBean implements FactoryBean<UserTransaction> { @Override public UserTransaction getObject() throws Exception { return (UserTransaction)Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[] { getObjectType() }, new LazyInitializationHandler()); } }
UserTransactionFactoryBean implements FactoryBean<UserTransaction> { @Override public UserTransaction getObject() throws Exception { return (UserTransaction)Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[] { getObjectType() }, new LazyInitializationHandler()); }  }
UserTransactionFactoryBean implements FactoryBean<UserTransaction> { @Override public UserTransaction getObject() throws Exception { return (UserTransaction)Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[] { getObjectType() }, new LazyInitializationHandler()); }  @Override UserTransaction getObject(); @Override Class<UserTransaction> getObjectType(); @Override boolean isSingleton(); }
UserTransactionFactoryBean implements FactoryBean<UserTransaction> { @Override public UserTransaction getObject() throws Exception { return (UserTransaction)Proxy.newProxyInstance(getClass().getClassLoader(), new Class<?>[] { getObjectType() }, new LazyInitializationHandler()); }  @Override UserTransaction getObject(); @Override Class<UserTransaction> getObjectType(); @Override boolean isSingleton();  }