Discussion:
[Middlegen-user] XDoclet settings for @weblogic.cache
Rod Macpherson
2003-01-21 16:35:07 UTC
Permalink
The entity-cmp-20.vm velocity script in middlegen sets the following for
read-only beans:

*
* @weblogic-cache concurrency-strategy="ReadyOnly"
*
*

I pressume this is because the default concurrency-strategy is fine the
rest of the time, however, where to I set the other weblogic-cache
attributes? I am editing entity-cmp-20.vm and adding this

* @weblogic.cache
* max-beans-in-cache="50"
* concurrency-strategy=#if( $table.readOnly
)"ReadOnly"#else"Database"#end
* read-timeout-seconds="600"
* idle-timeout-seconds="5"

Is it recommended to edit this and rebuild middlegen for such a change?
Should these attributes not be exposed in the ant task?

Rod
Aslak Hellesoy
2003-01-21 20:20:05 UTC
Permalink
You don't need to rebuild Middlegen. Here are two solutions

1) Specify your own template (from disk) using <fileproducer>
http://boss.bekk.no/boss/middlegen/plugins/index.html

2) I haven't tried this, but I believe you can override the @weblogic.cache
tag in the template by adding another in the top of the file generated by
Middlegen. Use Middlegen's merge feature for this
http://boss.bekk.no/boss/middlegen/plugins/cmp20.html (scroll to the bottom)

(Please send plain text email if you can, not HTML.)

HTH,
Aslak

-----Original Message-----
From: middlegen-user-***@lists.sourceforge.net
[mailto:middlegen-user-***@lists.sourceforge.net]On Behalf Of Rod
Macpherson
Sent: 21. januar 2003 19:35
To: middlegen-***@lists.sourceforge.net
Subject: [Middlegen-user] XDoclet settings for @weblogic.cache


The entity-cmp-20.vm velocity script in middlegen sets the following for
read-only beans:

*
* @weblogic-cache concurrency-strategy="ReadyOnly"
*
*

I pressume this is because the default concurrency-strategy is fine the rest
of the time, however, where to I set the other weblogic-cache attributes? I
am editing entity-cmp-20.vm and adding this

* @weblogic.cache
* max-beans-in-cache="50"
* concurrency-strategy=#if(
$table.readOnly )"ReadOnly"#else"Database"#end
* read-timeout-seconds="600"
* idle-timeout-seconds="5"

Is it recommended to edit this and rebuild middlegen for such a change?
Should these attributes not be exposed in the ant task?

Rod

Loading...