JiveJdon Community Forums
在线265人 Home | 论坛 | 培训咨询 | 精华 | 查搜 | 注册 | 登陆 |
首页 » 论坛 » J2EE/JavaEE/JEE/EJB/JSF等技术讨论
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表
???en_US.forumThreadNext.name??? 下一主题
这个主题共有 2 回复 / 1 页 [ ]  发表新帖子  回复该主题贴
pwy1983

发表文章: 3
注册时间: 2005年09月05日 13:15
给他发消息
求助关于EJB的部署问题(小弟是初学者,请各位大哥看一下) 发表: 2005年09月05日 13:20 回复
在weblogic部署EJB时出现以下红色英文字母是什么出错了:


Exception:weblogic.management.ApplicationException: prepare failed for bank2 Module: bank2 Error: Exception preparing module: EJBModule(bank2,status=NEW) Unable to deploy EJB: bank2.jar from bank2.jar: Compiler failed executable.exec at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) java.io.IOException: Compiler failed executable.exec at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:469) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336) at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178)

[Deployer:149033]preparing application bank2 on myserver
[Deployer:149033]failed application bank2 on myserver
[Deployer:149034]An exception occurred for task [Deployer:149026]Deploy application bank2 on myserver.: Exception:weblogic.management.ApplicationException: prepare failed for bank2 Module: bank2 Error: Exception preparing module: EJBModule(bank2,status=NEW) Unable to deploy EJB: bank2.jar from bank2.jar: Compiler failed executable.exec at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:274) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) java.io.IOException: Compiler failed executable.exec at weblogic.utils.compiler.CompilerInvoker.compileMaybeExit(CompilerInvoker.java:469) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:328) at weblogic.utils.compiler.CompilerInvoker.compile(CompilerInvoker.java:336) at weblogic.ejb20.ejbc.EJBCompiler.doCompile(EJBCompiler.java:270) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:476) at weblogic.ejb20.ejbc.EJBCompiler.compileEJB(EJBCompiler.java:407) at weblogic.ejb20.deployer.EJBDeployer.runEJBC(EJBDeployer.java:493) at weblogic.ejb20.deployer.EJBDeployer.compileJar(EJBDeployer.java:784) at weblogic.ejb20.deployer.EJBDeployer.compileIfNecessary(EJBDeployer.java:700) at weblogic.ejb20.deployer.EJBDeployer.prepare(EJBDeployer.java:1339) at weblogic.ejb20.deployer.EJBModule.prepare(EJBModule.java:498) at weblogic.j2ee.J2EEApplicationContainer.prepareModule(J2EEApplicationContainer.java:3142) at weblogic.j2ee.J2EEApplicationContainer.prepareModules(J2EEApplicationContainer.java:1583) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1227) at weblogic.j2ee.J2EEApplicationContainer.prepare(J2EEApplicationContainer.java:1070) at weblogic.management.deploy.slave.SlaveDeployer$ComponentActivateTask.prepareContainer(SlaveDeployer.java:2513) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.createContainer(SlaveDeployer.java:2463) at weblogic.management.deploy.slave.SlaveDeployer$ActivateTask.prepare(SlaveDeployer.java:2379) at weblogic.management.deploy.slave.SlaveDeployer.processPrepareTask(SlaveDeployer.java:866) at weblogic.management.deploy.slave.SlaveDeployer.prepareDelta(SlaveDeployer.java:594) at weblogic.management.deploy.slave.SlaveDeployer.prepareUpdate(SlaveDeployer.java:508) at weblogic.drs.internal.SlaveCallbackHandler$1.execute(SlaveCallbackHandler.java:25) at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:219) at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:178) .

源文件如下:

1.BankBean:

package bankbmp;

// The source files use explicit imports instead of importing a package.*.
// While this is a matter of personal preference, using explicit imports
// allows the user to quickly learn which package contains a class.
import java.rmi.RemoteException;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.Statement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.Collection;

import javax.ejb.DuplicateK**Exception;
import javax.ejb.EntityContext;
import javax.ejb.EntityBean;
import javax.ejb.EJBException;
import javax.ejb.NoSuchEntityException;
import javax.ejb.ObjectNotFoundException;
import javax.ejb.RemoveException;
import javax.naming.Context;
import javax.naming.InitialContext;
import javax.naming.NamingException;
import javax.sql.DataSource;

public class BankBean implements EntityBean {

// The next three variables are instance variables, but are not tied
// to a particular identity/primary k**. These variables are set in
// the setEntityContext method before the bean has an identity and
// are used for the lifetime of the bean instance.

private EntityContext ctx;
private DataSource dataSource;
private String tableName;

private Integer accountID; //primary k**
private String ownerName;
private float accountValue;
private int accountLevel;


// The setEntityContext method receives an EntityContext reference
// which it stores in a member variable. It also uses the EJB's
// environment context to look up some deployment-specific
// parameters. When the EJB is deployed, the deployer will specify
// values for the tableName and poolName parameters in the
// EJB-jar.xml which match the deployment environment. This allows
// these values not to be hard-coded into the bean. The
// setEntityContext method also gets a DataSource object from the
// environment. This will be used to get database connections from
// the connection pool.

public void setEntityContext(EntityContext c) {

ctx = c;

try {
Context envCtx = (Context) new InitialContext().lookup("java:/comp/env");

tableName = (String) envCtx.lookup("tableName");

String poolName = (String) envCtx.lookup("poolName");

dataSource = (DataSource) envCtx.lookup("/jdbc/"+poolName);
} catch (NamingException ne) {
// EJB was not deployed properly
throw new EJBException(ne);
}

}

public void unsetEntityContext() {
ctx = null;
}

public Integer EJBCreate(int accountID,String ownerName,
float accountValue,int accountLevel)
{
this.accountID = new Integer(accountID);
this.ownerName = ownerName;
this.accountValue =accountValue;
this.accountLevel = accountLevel;

Connection con = null;
PreparedStatement ps = null;
Statement stmt=null;

try {
con = dataSource.getConnection();
System.out.println("----\nConnect successful");
ps = con.prepareStatement("insert into "+tableName+
" (accountID,ownerName,accountValue,accountLevel) values(?,?,?,?)");
ps.setInt(1,accountID);
ps.setString(2,ownerName);
ps.setFloat(3,accountValue);
ps.setInt(4,accountLevel);
ps.executeUpdate();
System.out.println(accountID+" "+ownerName);
System.out.println(accountValue+" "+accountLevel);
System.out.println("insert successful:"+tableName);
//when use no-transaction sataSource add follow:
//con.commit();
return this.accountID;
} catch (SQLException sqe){
try {
EJBFindByPrimaryK**(this.accountID);
throw new DuplicateK**Exception("A Bank with bank "+
"account: "+accountID+" already exists.");
} catch (Exception Ignore){}
System.out.println("Insert failed");
//sqe.printStackTrace();
throw new EJBException(sqe);
} finally {
try {
if (ps != null) ps.close();
if (con != null) con.close();
} catch (Exception ignore) {}
}
}

// This implementation requires no post-create initialization so
// this required method is empty
public void EJBPostCreate(int accountID,String ownerName,
float accountValue,int accountLevel) {}

// The EJBRemove method is responsible for deleting the instance
// from the database. This method uses a SQL delete to delete the instance.
public void EJBRemove() throws RemoveException
{
Connection con = null;
PreparedStatement ps = null;
try {
System.out.println("ejbRemove()");
con = dataSource.getConnection();
ps = con.prepareStatement("delete from "+tableName+
" where accountID=?");
ps.setInt(1, accountID.intValue());
if (ps.executeUpdate() < 1) {
throw new RemoveException ("Error removing Bank with accountID: "+accountID);
}
} catch (SQLException sqe) {
throw new EJBException (sqe);
} finally{
try {
if(ps != null) ps.close();
if(con != null) con.close();
} catch (Exception ignore) {}
}
}

// EJBLoad reads the entity bean's current state from the database
// and assigns the values to its member variables. The primary k**
// is available from the EntityContext member variable. If the
// entity bean no longer exists, NoSuchEntityException is thrown.
// This might occur if the entity bean was deleted by another client
// or directly from the database.
public void EJBLoad() {
accountID = (Integer) ctx.getPrimaryK**();
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
System.out.println("ejbLoad()");
con = dataSource.getConnection();
ps = con.prepareStatement("select ownerName,accountValue,accountLevel from "+
tableName+ " where accountID=?");
ps.setInt(1, accountID.intValue());
ps.executeQuery();
rs = ps.getResultSet();

if (rs.next()) {
ownerName = rs.getString(1);
accountValue = rs.getFloat(2);
accountLevel = rs.getInt(3);
} else {
throw new NoSuchEntityException("Bank with bank "+
"account: "+accountID+" no longer exists.");
}
} catch (SQLException sqe) {
throw new EJBException(sqe);
} finally {
try {
if (rs != null) rs.close();
if (ps != null) ps.close();
if (con != null) con.close();
} catch (Exception ignore) {}
}
}

// The EJBStore method will be called to write the entity bean's
// state back to the database. The primary k** field is not written
// since primary k**s should never change. An optimized version of
// this bean could also skip writing the name field since it is
// never updated.
public void EJBStore(){
Connection con = null;
PreparedStatement ps = null;
try {
System.out.println("ejbStore()");
con = dataSource.getConnection();
ps = con.prepareStatement("update "+tableName+
" SET ownerName=?,accountValue=?,accountLevel=? where accountID=?");

ps.setString(1, ownerName);
ps.setFloat(2, accountValue);
ps.setInt(3, accountLevel);
ps.setInt(4, accountID.intValue());

ps.executeUpdate();
} catch (SQLException sqe) {
System.out.println("ejbStore() error");
//throw new EJBException(sqe);
} finally {
try {
if (ps != null) ps.close();
if (con != null) con.close();
} catch (Exception ignore) {}
}
}

// The EJBActivate and EJBPassivate methods are required by the
// EntityBean interface, but this bean does not use these callbacks.
public void EJBActivate() {}
public void EJBPassivate() {}

// The EJBFindByPrimaryK** method needs to test whether the passed
// k** exists in the database. If the select returns a row then the
// primary k** is returned. If the k** does not exist, an
// ObjectNotFoundException is thrown.
public Integer EJBFindByPrimaryK**(Integer pk)
throws ObjectNotFoundException
{
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
System.out.println("ejbFindByPrimaryK**()");
con = dataSource.getConnection();
ps = con.prepareStatement("select accountID from "+tableName+
" where accountID=?");
ps.setInt(1, pk.intValue());
ps.executeQuery();

rs = ps.getResultSet();

if (rs.next()) {
return pk;
} else {
throw new ObjectNotFoundException ("Bank with bank "+
"account: "+accountID+" no longer exists.");
}
} catch (SQLException sqe) {
//throw new EJBException (sqe);
throw new EJBException("ejbFindByPrimaryK**() error");
} finally {
try {
if(rs != null) rs.close();
if(ps != null) ps.close();
if(con != null) con.close();
} catch (Exception ignore) {}
}
}
// The EJBFindBankLevel method returns a Collection of
// Banks which match the query. The finder method returns a
// Collection of primary k**s. The EJB container will convert these
// into EJBObject references and return them to the client. If now
// primary k**s match the query, an empty Collection is returned.
public Collection EJBFindBankLevel(int accountLevelValue) {
Connection con = null;
PreparedStatement ps = null;
ResultSet rs = null;

ArrayList k**s = new ArrayList();
try {
con = dataSource.getConnection();
ps = con.prepareStatement("select accountID from "+tableName+
" where accountLevel=?");
ps.setInt(1, accountLevelValue);
ps.executeQuery();

rs = ps.getResultSet();
while (rs.next()) {
k**s.add(new Integer(rs.getInt(1)));
}
return k**s;
} catch (SQLException sqe) {
//throw new EJBException (sqe);
throw new EJBException("get PK error");
} finally {
try {
if(rs != null) rs.close();
if(ps != null) ps.close();
if(con != null) con.close();
} catch (Exception ignore) {}
}
}
// These methods implement the business methods defined in the
// Bank Remote interface.
public String getownerName() { return ownerName; }
public Integer getaccountID() { return accountID; }
public float getaccountValue(){return accountValue; }
public int getaccountLevel() { return accountLevel; }
public void setaccountLevel(int accountLevel) {
this.accountLevel = accountLevel;
}
}

BankHome:

package bankbmp;

import java.rmi.RemoteException;
import java.util.Collection;

import javax.ejb.CreateException;
import javax.ejb.FinderException;
import javax.ejb.EJBHome;

public interface BankHome extends EJBHome {

// create method
public Bank create(int accountID, String ownerName,float accountValue,int accountLevel)
throws CreateException, RemoteException;

// finders
public Bank findByPrimaryK**(Integer accountID)
throws FinderException, RemoteException;

public Collection findBankLevel(int accountLevel)
throws FinderException, RemoteException

}

Bank:

package bankbmp;

import java.rmi.RemoteException;

import javax.ejb.EJBObject;


public interface Bank extends EJBObject {

public String getownerName() throws RemoteException;

public Integer getaccountID() throws RemoteException;

public int getaccountLevel() throws RemoteException;

public float getaccountValue() throws RemoteException;

public void setaccountLevel(int accountLevel) throws RemoteException;
}

ejb-jar:

<!DOCTYPE EJB-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>


<!-- Generated XML! -->

<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>theBankEJB</ejb-name>
<home>bankbmp.BankHome</home>
<remote>bankbmp.Bank</remote>
<ejb-class>bankbmp.BankBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-k**-class>java.lang.Integer</prim-k**-class>
<reentrant>False</reentrant>
<primk**-field>accountID</primk**-field>
<env-entry>
<env-entry-name>tableName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>t_BankAccount</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>poolName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>dbpool</env-entry-value>
</env-entry>
<resource-ref>
<res-ref-name>jdbc/dbpool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>theBankEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>
weblogic-ejb-jar:

<!DOCTYPE weblogic-ejb-jar PUBLIC '-//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>


<!-- Generated XML! -->
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>theBankEJB</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/dbpool</res-ref-name>
<jndi-name>JTA-dataSource</jndi-name>
</resource-description>
</reference-descriptor>

<jndi-name>theBankEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>
以下是bank.jar的目录:

META -INF/ejb-jar.xml weblogic-ejb-jar

bankbmp/BankBean.class Bank.class Bank.class
我只是在BankBean里添加了方法public float getaccountValue(){return accountValue; }和在远程接口添加了相对应的方法 public float getaccountValue() throws RemoteException;所部署的EJB就部署不了

如果把上述的方法语句去掉却可以部署

这是为什么呢

pwy1983

发表文章: 3
注册时间: 2005年09月05日 13:15
给他发消息
Re: 求助关于EJB的部署问题(小弟是初学者,请各位大哥看一下) 发表: 2005年09月05日 13:39 回复


ejb-jar:

<!DOCTYPE EJB-jar PUBLIC '-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN' 'http://java.sun.com/dtd/ejb-jar_2_0.dtd'>


<!-- Generated XML! -->

<ejb-jar>
<enterprise-beans>
<entity>
<ejb-name>theBankEJB</ejb-name>
<home>bankbmp.BankHome</home>
<remote>bankbmp.Bank</remote>
<ejb-class>bankbmp.BankBean</ejb-class>
<persistence-type>Bean</persistence-type>
<prim-k**-class>java.lang.Integer</prim-k**-class>
<reentrant>False</reentrant>
<primk**-field>accountID</primk**-field>
<env-entry>
<env-entry-name>tableName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>t_BankAccount</env-entry-value>
</env-entry>
<env-entry>
<env-entry-name>poolName</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>dbpool</env-entry-value>
</env-entry>
<resource-ref>
<res-ref-name>jdbc/dbpool</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>

<assembly-descriptor>
<container-transaction>
<method>
<ejb-name>theBankEJB</ejb-name>
<method-name>*</method-name>
</method>
<trans-attribute>Required</trans-attribute>
</container-transaction>
</assembly-descriptor>

</ejb-jar>
weblogic-ejb-jar:

<!DOCTYPE weblogic-ejb-jar PUBLIC '-
//BEA Systems, Inc.//DTD WebLogic 7.0.0 EJB//EN' 'http://www.bea.com/servers/wls700/dtd/weblogic-ejb-jar.dtd'>


<!-- Generated XML! -->
<weblogic-ejb-jar>
<weblogic-enterprise-bean>
<ejb-name>theBankEJB</ejb-name>
<reference-descriptor>
<resource-description>
<res-ref-name>jdbc/dbpool</res-ref-name>
<jndi-name>JTA-dataSource</jndi-name>
</resource-description>
</reference-descriptor>

<jndi-name>theBankEJB</jndi-name>
</weblogic-enterprise-bean>
</weblogic-ejb-jar>


pwy1983

发表文章: 3
注册时间: 2005年09月05日 13:15
给他发消息
Re: 求助关于EJB的部署问题(小弟是初学者,请各位大哥看一下) 发表: 2005年09月05日 13:40 回复
上面为那两个xml部署文件
这个主题有 2 回复 / 1 页 [ ]
???en_US.forumThreadPrev.name??? 上一主题
Go back to the topic listing   返回主题列表    返回页首  返回页首
???en_US.forumThreadNext.name??? 下一主题
热点TAG: AOP cache DDD EJB 集群 设计模式 Hibernate IOC JiveJdon OO RBAC Spring Struts
查询本论坛内 回复超过的热门帖子
快速发表回复
标题
 
粗体 斜体 下划线 插入图片 插入代码 插入url链接 插入附件
内容
 

解惑之道在J道 ,打造中国最具影响力的的企业软件社区
OpenSource JIVEJDON v3.0 Powered by JdonFramework Code © 2002-08 jdon.com

anti spam