Bugs item #607213, was opened at 2002-09-10 04:11
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=607213&group_id=22866
Category: JBossCMP
>Group: v3.0 Rabbit Hole
Status: Open
Resolution: None
Priority: 5
Submitted By: vishal (attachvishal)
>Assigned to: Dain Sundstrom (dsundstrom)
Summary: Read-Only Entity Bean
Initial Comment:
I am using jboss3.0.2 and i defined my entity bean as read-only in
jbosscmp-jdbc.xml.It looks like this
<entity>
<ejb-
name>uk.co.isesolutions.apps.ccd.customer.entity.Customer</ejb-
name>
<table-name>CNCUSTOMER</table-name>
[b]<read-only>true</read-only>
<read-time-out>1000</read-
time-out>[/b]
<cmp-field>
<field-
name>cnCustomer</field-name>
<column-
name>CNCUSTOMER</column-name>
<sql-
type>NUMBER(12)</sql-type>
</cmp-field>
<cmp-
field>
<field-name>u_Version</field-name>
<column-
name>U_VERSION</column-name>
<sql-
type>VARCHAR2(1)</sql-type>
</cmp-field>
...............
<cmp-field>
<field-
name>cnaccom_Typ</field-name>
<column-
name>ACCOM_TYP</column-name>
<!-- <read-
only>true</read-only>
<read-time-out>1000</read-time-out>--
>
<sql-type>NUMBER(12)</sql-type>
</cmp-field>
........
</entity>
and in Session bean i looked for
Customer entity bean something like this
Customer
customer =
getCustomerHome(CustomerHome.class).findByPrimaryKey(new
CustomerPK(id));
customerVO =
customer.showCustomerDetails();
/*
the Below line
should throw EJBException but container allows me update
*/
customer.setCnaccom_Typ(new
Long(213));
At the jboss trace i noticed this
09:54:13,937 DEBUG [findByPrimaryKey] Executing SQL:
SELECT CNCUSTOMER FROM CNCUSTOMER WHERE
CNCUSTOMER=?
09:54:13,968 DEBUG [Customer]
Executing SQL: SELECT CNORIGIN, SURNAME, CNORIGIN,
FORENAME, DOB_DAT, ACTIVE_FLG FROM
CNCUSTOMER WHERE
(CNCUSTOMER=?)
[b]09:54:14,875 DEBUG [Customer]
Executing SQL: UPDATE CNCUSTOMER SET
ACCOM_TYP=? WHERE CNCUSTOMER=?
09:54:14,890
DEBUG [Customer] Rows affected = 1[/b]
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=376685&aid=607213&group_id=22866
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development