Bugs item #886791, was opened at 2004-01-29 09:16
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=886791&group_id=22866
Category: JBossCMP
Group: v3.2
Status: Open
Resolution: None
Priority: 5
Submitted By: Rafal Kedziorski (rafciom)
Assigned to: Nobody/Anonymous (nobody)
Summary: on-find with commit option C don't work
Initial Comment:
hi,
some weeks ago (I thinh it was JBoss 3.2.2) I posted
this bug to the jboss users. "on-find" is not working
in JBoss 3.2.2 (JBoss 3.2.3 I couldn't check, cause we
have other problems with this version) and with JBoss
3.2.4RC1 from CVS (last update 28.01.04).
This is my entity bean:
package net.magix.ejb.setting.entitybeans;
import javax.ejb.CreateException;
import javax.ejb.EntityBean;
import net.magix.ejb.entitybeans.AbstractEntityBean;
/**
* Description of the Class
*
* @author Rafal Kedziorski
* @version $Id: Setting_2_UserBean.java,v 1.16
2004/01/29 07:28:36 rafal Exp $
* @ejb.bean
* name = "Setting_2_UserBean"
* description = "Setting_2_User Entity Bean"
* display-name = "Setting_2_User Entity Bean"
* local-jndi-name = "setting/Setting_2_UserBean"
* view-type = "local"
* type = "CMP"
* cmp-version = "2.x"
* schema = "setting_2_user"
* primkey-field = "setting_2_user_id"
*
* @ejb.finder
* view-type = "local"
* signature = "java.util.Collection
findAllByUserId(java.lang.Long user_id)"
* query = "SELECT OBJECT(o) FROM setting_2_user
o WHERE o.user_id = ?1"
* result-type-mapping = "Local"
*
* @ejb.finder
* view-type = "local"
* signature =
"net.magix.ejb.setting.entitybeans.Setting_2_UserBeanLocalHome
findBySettingIdAndUserId(java.lang.Integer setting_id,
java.lang.Long user_id)"
* query = "SELECT OBJECT(o) FROM setting_2_user
o WHERE o.setting_id = ?1 AND o.user_id = ?2"
* result-type-mapping = "Local"
*
* @ejb.security-identity
* use-caller-identity = "true"
*
* @ejb.transaction
* type = "Mandatory"
*
* @jboss.persistence
* row-locking = "true"
* list-cache-max = "2000"
*
* @ejb.persistence
* table-name = "setting_2_user"
*
* @jboss.container-configuration
* name = "Standard CMP 2.x EntityBean with
Commit Option C"
*
* @jboss.read-ahead
* strategy = "on-find"
* page-size = "4"
* eager-load-group = "*"
*
* @jboss.entity-command
* name = "mysql-get-generated-keys"
*
*/
public abstract class Setting_2_UserBean extends
AbstractEntityBean implements EntityBean {
/**
* Gets the setting_2_user_id attribute of the
Setting_2_UserBean object
*
* @return The setting_2_user_id value
* @ejb.pk-field
*
* @ejb.persistence
* column-name = "setting_2_user_id"
* sql-type = "setting_2_user_id"
*
* @jboss.persistence
* auto-increment = "true"
*
* @jboss.method-attributes
* read-only = "true"
*
* @ejb.interface-method
* view-type = "local"
*
*/
public abstract Long getSetting_2_user_id();
/**
* Sets the setting_2_user_id attribute of the
Setting_2_UserBean object
*
* @param setting_2_user_id The new setting_id value
*/
public abstract void setSetting_2_user_id(Long
setting_2_user_id);
/**
* Gets the setting_id attribute of the
Setting_2_UserBean object
*
* @return The setting_id value
* @ejb.persistence
* column-name = "setting_id"
* sql-type = "setting_id"
*
* @jboss.method-attributes
* read-only = "true"
*
* @ejb.interface-method
* view-type = "local"
*
*/
public abstract Integer getSetting_id();
/**
* Sets the setting_id attribute of the
Setting_2_UserBean object
*
* @param setting_id The new setting_id value
*/
public abstract void setSetting_id(Integer setting_id);
/**
* Gets the user_id attribute of the UserEntityBean
object
*
* @return The user_id value
* @ejb.persistence
* column-name = "user_id"
* sql-type = "user_id"
*
* @jboss.method-attributes
* read-only = "true"
*
* @ejb.interface-method
* view-type = "local"
*
*/
public abstract Long getUser_id();
/**
* Sets the user_id attribute of the UserEntityBean
object
*
* @param user_id The new user_id value
*/
public abstract void setUser_id(Long user_id);
/**
* Gets the value attribute of the
Setting_2_UserBean object
*
* @return The value
* @ejb.persistence
* column-name = "value"
* sql-type = "value"
*
* @jboss.method-attributes
* read-only = "true"
*
* @ejb.interface-method
* view-type = "local"
*
*/
public abstract String getValue();
/**
* Sets the value attribute of the
Setting_2_UserBean object
*
* @param value The new value
* @ejb.transaction
* type = "Mandatory"
*
* @ejb.interface-method
* view-type = "local"
*
*/
public abstract void setValue(String value);
/**
* Description of the Method
*
* @param setting_id Description of the
Parameter
* @param user_id Description of the
Parameter
* @param value Description of the
Parameter
* @return Description of the
Return Value
* @exception CreateException Description of the
Exception
* @ejb.create-method
*
*/
public Long ejbCreate(Integer setting_id, Long
user_id, String value)
throws CreateException {
if (logger.isDebugEnabled()) {
logger.debug("Setting_2_UserBean('" +
setting_id + "', '" + user_id + "', '" + value + "')
entered");
}
setSetting_id(setting_id);
setUser_id(user_id);
setValue(value);
return null;
}
/**
* Description of the Method
*
* @param setting_id Description of the
Parameter
* @param user_id Description of the
Parameter
* @param value Description of the
Parameter
* @exception CreateException Description of the
Exception
*/
public void ejbPostCreate(Integer setting_id, Long
user_id, String value)
throws CreateException { }
}
This happens:
1. get the bean (correct)
2. read value (correct)
3. set new value (correct, but JBossCMP isn't sending
query to database)
Best Regards,
Rafal
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=886791&group_id=22866
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
JBoss-Development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development