Hello,
This is the sample of the code from the CMP bean I have been trying to deploy on JBOSS
3.2.4. Do you think I am missing any jars in my build class path? I am assuming not,
as I haven't had errors deploying all the other types of beans. Apparently, this
example worked fine on JBOSS 3.2.1.
Thanks in advance.
package dot.com.tsc.cmp;
import javax.ejb.EntityBean;
import javax.ejb.EntityContext;
/**
* @ejb.bean name="Supplier"
* jndi-name="SupplierBean"
* type="CMP"
* primkey-field="supplierID"
* schema="MyStoreSupplier"
* cmp-version="2.x"
*
* @ejb.persistence
* table-name="Supplier"
*
* @ejb.finder
* query="SELECT OBJECT(a) FROM MyStoreSupplier as a"
* signature="java.util.Collection findAll()"
*
* @ejb.finder
* query="SELECT OBJECT(b) FROM MyStoreSupplier as b where b.userID = ?1"
* signature="au.com.tsc.cmp.SupplierLocal findUserID(java.lang.String userID)"
*
**/
public abstract class SupplierBean implements EntityBean {
/**
* The ejbCreate method.
*
* @ejb.create-method
*/
public java.lang.String ejbCreate(String supplierID, String userID, String
firstName,
String
lastName, String address, String message, Float creditLimit ) throws
javax.ejb.CreateException {
// EJB 2.0 spec says return null for CMP ejbCreate methods.
// TODO: YOU MUST INITIALIZE THE FIELDS FOR THE BEAN HERE.
// setMyField("Something");
setSupplierID(supplierID);
setUserID(userID);
setFirstName(firstName);
setLastName(lastName);
setAddress(address);
setMessage(message);
setCreditLimit(creditLimit);
return null;
}
protected EntityContext eContext ;
/**
* Sets the entity context
* @param javax.ejb.EntityContext the new eContext value
* @ejb.method setEnityContext
**/
public void setEntityContext(EntityContext context) {
eContext = context;
}
/**
* Unsets the enity context
* @param javax.ejb.EntityContext eContext value
**/
public void unsetEntityContext() {
eContext = null;
}
.
.
.
.
.
.
.
}
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3839235#3839235
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3839235
-------------------------------------------------------
This SF.Net email is sponsored by The 2004 JavaOne(SM) Conference
Learn from the experts at JavaOne(SM), Sun's Worldwide Java Developer
Conference, June 28 - July 1 at the Moscone Center in San Francisco, CA
REGISTER AND SAVE! http://java.sun.com/javaone/sf Priority Code NWMGYKND
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user