[224221] EJBBean needs updates to support EJB 3.0
diff --git a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/EJBBean.java b/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/EJBBean.java
index 41cb052..9d9cb66 100644
--- a/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/EJBBean.java
+++ b/plugins/org.eclipse.jst.server.core/src/org/eclipse/jst/server/core/EJBBean.java
@@ -25,9 +25,15 @@
* @plannedfor 3.0
*/
public class EJBBean extends ModuleArtifactDelegate {
+ public final static String EJB_11 = "1.1";
+ public final static String EJB_20 = "2.0";
+ public final static String EJB_21 = "2.1";
+ public final static String EJB_30 = "3.0";
+
private String jndiName;
private boolean local;
private boolean remote;
+ private String version;
/**
* Create a new EJBBean.
@@ -44,6 +50,26 @@
this.jndiName = jndiName;
this.remote = remote;
this.local = local;
+ this.version = "2.1";
+ }
+
+ /**
+ * Create a new EJBBean with a specific version
+ *
+ * @param module the module that the EJB is contained in
+ * @param jndiName the JNDI name of the EJB
+ * @param remote <code>true</code> if the EJB has a remote interface, and
+ * <code>false</code> otherwise
+ * @param local <code>true</code> if the EJB has a local interface, and
+ * <code>false</code> otherwise
+ * @param version the level of the EJB specification that this EJB uses. Use one of the <code>EJB_xx</code> constants declared on {@link EJBBean}
+ */
+ public EJBBean(IModule module, String jndiName, boolean remote, boolean local, String version) {
+ super(module);
+ this.jndiName = jndiName;
+ this.remote = remote;
+ this.local = local;
+ this.version = version;
}
/**
@@ -81,6 +107,15 @@
public boolean hasLocalInterface() {
return local;
}
+
+ /**
+ * Returns the level of the specification of the EJB
+ *
+ * @return the level of the specification of the EJB
+ */
+ public String getVersion() {
+ return version;
+ }
/*
* @see ModuleArtifactDelegate#getName()