getLog().debug(" testContainerObjects()");
CtsBmp bean = null;
try {
CtsBmpHome home = getHome();
AccountPK pk = new AccountPK(BEAN_PK_007);
mbx.clearMessages();
getLog().debug("Create a bean...");
bean = doEjbCreate(pk, BEAN_NAME);
getLog().debug("OK");
getLog().debug("Get HomeHandle..." );
HomeHandle homeHan = home.getHomeHandle();
assertTrue(homeHan != null);
getLog().debug("OK");
getLog().debug("Get another home from the HomeHandle...");
CtsBmpHome anotherHome = (CtsBmpHome)homeHan.getEJBHome();
assertTrue(anotherHome != null);
getLog().debug("OK");
getLog().debug("Get the Meta-data object...");
EJBMetaData md = anotherHome.getEJBMetaData();
assertTrue(md != null);
getLog().debug("OK");
getLog().debug("Probe the Meta-data object:");
String homeInterface = md.getHomeInterfaceClass().getName();
String primaryKey = md.getPrimaryKeyClass().getName();
String remoteInterface = md.getRemoteInterfaceClass().getName();
getLog().debug(" Home Interface : " + homeInterface);
getLog().debug(" PrimaryKey : " + primaryKey);
getLog().debug(" Remote Interface: " + remoteInterface);
assertTrue(homeInterface.equals("org.jboss.test.cts.interfaces.CtsBmpHome"));
assertTrue(primaryKey.equals("org.jboss.test.cts.keys.AccountPK"));
assertTrue(remoteInterface.equals("org.jboss.test.cts.interfaces.CtsBmp"));
getLog().debug("Meta-data OK");
getLog().debug("Check isSession()==false ...");
assertTrue(!md.isSession());
getLog().debug("OK");
getLog().debug("Check isStatelessSession()==false ...");
assertTrue(!md.isStatelessSession());
getLog().debug("OK");
getLog().debug("Test EJBHome.remove(PrimaryKey)");
anotherHome.remove(pk);
getLog().debug("OK");
} catch (Exception ex) {
getLog().error("Error in bmptest", ex);
fail("testEjbCreate has failed!");