Friday, September 05, 2008

Tips: Declare cmp-field in Jboss 5.0.0.CR1 version

Delicious 0
After add jboss ejb property from XDoclet setting. We can run Xdoclet with MyEclipse then cmp-field will be auto create by XDoclet. But, in jboss 5.0.0.CR1 version, cmp must match (field-name, read-only? read-time-out?, conlum-name?, not-null?, ((jdbc-type, sql-type)|(property+))?)
So, you must declare those by adding following line in the top of ejb bean class:

* @jboss.unknown-pk class="java.lang.Integer" 
 *   read-only="true"
 *   read-time-out="6000"
 *   column-name="article_id"
 *   not-null="true"
 *      jdbc-type="INTEGER" 
 *      sql-type="int"

It will resolved problem when deloying cmp to Jboss server 5.0.0.CR1 with error:.... "cmp-field" must match (field-name, read-only? read-time-out?, conlum-name?, not-null?, ((jdbc-type, sql-type)|(property+))?)...

Related Posts:

Dont just read, download and go, a thank will be helpful for the author to keep going a good job.

Share this post to tell other people about its

blog comments powered by Disqus