}
public static void testLongLivedSession() throws Exception
{
ShoppingCart test = (ShoppingCart) getInitialContext().lookup("ShoppingCartBean/remote");
StatelessRemote remote = (StatelessRemote) getInitialContext().lookup("StatelessSessionBean/remote");
Customer c;
long id = test.createCustomer();
c = remote.find(id);
System.out.println("Created customer: " + c.getName());
test.update();
c = remote.find(id);
System.out.println("ShoppingCartBean.customer should stay managed because we're in an extended PC: Customer.getName() == " + c.getName());
test.update3();
c = remote.find(id);
System.out.println("Extended persistence contexts are propagated to nested EJB calls: Customer.getName() == " + c.getName());
test.checkout();
}