@Test public void testGetObject_Null() throws Exception { Jta.configure(null, null); UserTransaction userTransaction = userTransactionFactoryBean.getObject(); assertNotNull(userTransaction); assertTrue(Proxy.isProxyClass(userTransaction.getClass())); try { userTransaction.getStatus(); fail("IllegalStateException should have been thrown"); } catch (IllegalStateException e) {} }
@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();  }