EMAIL:[email protected]另外我在运行时看到: -- Initializing bean access.-- Succeeded initializing bean access.-- Execution time: 2500 ms.Error in getName(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.the name is: 就不出结果。如果不用session直接用CMP就可以。
-- Initializing bean access.-- Succeeded initializing bean access.-- Execution time: 2500 ms.Error in getName(): Remote interface reference is null. It must be created by calling one of the Home interface methods first.the name is:
就不出结果。如果不用session直接用CMP就可以。
你create了吗?
你得到一个sessionbeanhome以后,create一下即可
LoginSessionLocalHome home = (LoginSessionLocalHome) ctx.lookup(
"sample.ejb.session.LoginSessionLocalHome");
LoginSessionLocal session = home.create(); //这里 result = session.addNew(name, password);