<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to change-notes</title><link href="https://sourceforge.net/p/jboss/change-notes/" rel="alternate"/><link href="https://sourceforge.net/p/jboss/change-notes/feed.atom" rel="self"/><id>https://sourceforge.net/p/jboss/change-notes/</id><updated>2004-08-10T23:00:11Z</updated><subtitle>Recent changes to change-notes</subtitle><entry><title>XMBean now implements NotificationListener</title><link href="https://sourceforge.net/p/jboss/change-notes/279/" rel="alternate"/><published>2004-08-10T23:00:11Z</published><updated>2004-08-10T23:00:11Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.net1e55abf3bb8c245f1c053610f2b76da9bcb5cdba</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;Implement NotificationListener interface by simply &lt;br /&gt;
forwarding any received Notification to the wrapped &lt;br /&gt;
resource, if it implements the NotificationListener &lt;br /&gt;
interface, too.&lt;br /&gt;
This is needed to allow the wrapped resource to register &lt;br /&gt;
for Notifications using the XMBean ObjectName, rather &lt;br /&gt;
than its own this reference.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>EJB QL 2.1</title><link href="https://sourceforge.net/p/jboss/change-notes/278/" rel="alternate"/><published>2004-03-16T11:03:05Z</published><updated>2004-03-16T11:03:05Z</updated><author><name>Alexey Loubyansky</name><uri>https://sourceforge.net/u/loubyansky/</uri></author><id>https://sourceforge.net5080f48ede422871a8ef6b440554c5521e6dcb18</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;EJB QL 2.1 support is added to JBoss-4.0.0DR3.&lt;/p&gt;
&lt;p&gt;New in EJB QL 2.1 (comparing to EJB QL 2.0):&lt;/p&gt;
&lt;p&gt;* ORDER BY clause&lt;br /&gt;
EJB QL ::= select_clause from_clause [where_clause]&lt;br /&gt;
[orderby_clause]&lt;/p&gt;
&lt;p&gt;* IN expression&lt;br /&gt;
cmp_path_expression [NOT] IN ( {literal |&lt;br /&gt;
input_parameter} [, {literal | input_parameter}]* )&lt;/p&gt;
&lt;p&gt;The cmp_path_expression can now have a numeric value in&lt;br /&gt;
addition to string. Parameters can now appear in the IN&lt;br /&gt;
clause.&lt;/p&gt;
&lt;p&gt;* LIKE expression&lt;br /&gt;
cmp_path_expression [NOT] LIKE pattern_value [ESCAPE&lt;br /&gt;
escape_character]&lt;/p&gt;
&lt;p&gt;The pattern_value can now be a string valued input&lt;br /&gt;
parameter. The escape_character can now be a&lt;br /&gt;
character-valued input parameter.&lt;/p&gt;
&lt;p&gt;* Null Comparison Expression&lt;br /&gt;
{single_valued_path_expression | input_parameter } IS&lt;br /&gt;
[NOT ] NULL&lt;/p&gt;
&lt;p&gt;Can now check the input parameter for NULL value.&lt;/p&gt;
&lt;p&gt;* Functional Expressions&lt;/p&gt;
&lt;p&gt;Added arithmetic function MOD(int, int) returns int.&lt;/p&gt;
&lt;p&gt;* Aggregate Functions In Select Expression&lt;br /&gt;
select_clause ::=SELECT [DISTINCT ] {select_expression&lt;br /&gt;
|OBJECT (identification_variable)}&lt;br /&gt;
select_expression ::= single_valued_path_expression |&lt;br /&gt;
aggregate_select_expression&lt;br /&gt;
aggregate_select_expression ::=&lt;br /&gt;
{AVG |MAX |MIN |SUM |COUNT }( [DISTINCT ]&lt;br /&gt;
cmp_path_expression) |&lt;br /&gt;
COUNT ( [DISTINCT ] identification_variable |&lt;br /&gt;
single_valued_cmr_path_expression)&lt;/p&gt;
&lt;p&gt;JBossQL also supports EJB QL 2.1.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>Load-balance policy can now be aware of their birth node</title><link href="https://sourceforge.net/p/jboss/change-notes/277/" rel="alternate"/><published>2004-03-12T18:27:39Z</published><updated>2004-03-12T18:27:39Z</updated><author><name>Sacha Labourey</name><uri>https://sourceforge.net/u/slaboure/</uri></author><id>https://sourceforge.net8af93580cef4a2adac1bc84615671af7f2c7db9a</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;General:&lt;br /&gt;
LB policies can now be aware of the node on which they &lt;br /&gt;
have been created by extending the new &lt;br /&gt;
LoadBalancePolicyEx interface. The FirstAvailable policy &lt;br /&gt;
has been modified to benefit from that feature.&lt;/p&gt;
&lt;p&gt;Details:&lt;br /&gt;
In the past, proxies that had to pick-up a first target &lt;br /&gt;
couldn't simply ask on which node they had been &lt;br /&gt;
created and use that node. This is now possible. &lt;/p&gt;
&lt;p&gt;This is specifically interesting for SFSB: the default &lt;br /&gt;
remote LB is now not only using the "FirstAvailable" (i.e. &lt;br /&gt;
sticky) policy but will also start using the node on which &lt;br /&gt;
the session has been originally created to perform &lt;br /&gt;
remote calls (i.e. the node on which the home.create &lt;br /&gt;
(...) has been performed.)&lt;/p&gt;
&lt;p&gt;This is interesting for (possibly clustered) webapps &lt;br /&gt;
making calls to a remote and distinct cluster of SFSB &lt;br /&gt;
(http session containing a SFSB for example) as the &lt;br /&gt;
resulting load-balancing of SFSB may not be very &lt;br /&gt;
efficient in some cases and cause un-necessary failover &lt;br /&gt;
just after the session has been created.&lt;/p&gt;
&lt;p&gt;Migration:&lt;br /&gt;
The new behaviour should only be better (better &lt;br /&gt;
dispatching of session and less unnecessary initial &lt;br /&gt;
failovers). However, if you want to disable that new &lt;br /&gt;
behaviour, set &lt;br /&gt;
the "jboss.cluster.proxy.dont_remember_home" Java &lt;br /&gt;
system property to "true" on the **client side** JVM.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>New org.jboss.monitor.services.MemoryMonitor service</title><link href="https://sourceforge.net/p/jboss/change-notes/276/" rel="alternate"/><published>2004-03-10T11:31:00Z</published><updated>2004-03-10T11:31:00Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.netf20283fc2466d6dfbb40170adbc67d602efe553e</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;First version of a MemoryMonitor service.&lt;/p&gt;
&lt;p&gt;Introduces also the notion of a "stateful" alarm. Stateful&lt;br /&gt;
alarm notifications &lt;br /&gt;
(org.jboss.monitor.alarm.AlarmNotification) carry &lt;/p&gt;
&lt;p&gt;severity -&amp;gt; CLEARED, WARNING, MINOR, MAJOR, &lt;br /&gt;
CRITICAL, UNKNOWN (modeled after ITU-T X.733)&lt;/p&gt;
&lt;p&gt;and alarmState -&amp;gt; CREATED, CHANGED, CLEARED.&lt;/p&gt;
&lt;p&gt;Thus, you don't get separate notification types for &lt;br /&gt;
crossing different thresholds. You simply &lt;br /&gt;
get "jboss.alarm.memory.low" and by examining the &lt;br /&gt;
severity field you can tell the active state of the alar m&lt;br /&gt;
(CLEARED, WARNING, CRITICAL for this particular type).&lt;/p&gt;
&lt;p&gt;Also note it is possible to configure the number of &lt;br /&gt;
samples in the Warning area before emitting a &lt;br /&gt;
notification. This is to avoid spikes that result &lt;br /&gt;
temporarily in low memory conditions.&lt;/p&gt;
&lt;p&gt;Enjoy&lt;br /&gt;
/Dimitris&lt;/p&gt;
&lt;p&gt;See monitoring-service.xml for example:&lt;/p&gt;
&lt;p&gt;&amp;lt;!--&lt;br /&gt;
Example of listening for notifications from the &lt;br /&gt;
MemoryMonitor&lt;/p&gt;
&lt;p&gt;MemoryMonitor monitors the free JVM memory and &lt;br /&gt;
emits JMX Notifications&lt;br /&gt;
(org.jboss.monitor.alarm.AlarmNotification) when &lt;br /&gt;
certain thresholds&lt;br /&gt;
are crossed. &lt;/p&gt;
&lt;p&gt;The following attributes may be set:&lt;/p&gt;
&lt;p&gt;FreeMemoryWarningThreshold&lt;br /&gt;
- e.g. 1048576, or 1000k, or 1m&lt;br /&gt;
FreeMemoryCriticalThreshold &lt;br /&gt;
- like above, must be lower&lt;br /&gt;
SamplingPeriod &lt;br /&gt;
- e.g. 5000, or 5sec. &lt;br /&gt;
TriggeringWarningMeasurements &lt;br /&gt;
- number of measurements in the warning area to &lt;br /&gt;
trigger a notification&lt;/p&gt;
&lt;p&gt;AlarmNotification carries alarmState and alarmSeverity.&lt;br /&gt;
alarmSeverity takes the values CLEARED, WARNING, &lt;br /&gt;
CRITICAL for this monitor.&lt;br /&gt;
See org.jboss.monitor.alarm.Alarm&lt;/p&gt;
&lt;p&gt;The NotificationListener is simply used to output the &lt;br /&gt;
alarm on the console.&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
&amp;lt;mbean &lt;br /&gt;
code="org.jboss.monitor.services.MemoryMonitor"&lt;br /&gt;
name="jboss.monitor:service=MemoryMonitor"&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;attribute &lt;br /&gt;
name="FreeMemoryWarningThreshold"&amp;gt;17m&amp;lt;/attribute&amp;gt;&lt;br /&gt;
&amp;lt;attribute &lt;br /&gt;
name="FreeMemoryCriticalThreshold"&amp;gt;16m&amp;lt;/attribute&amp;gt;  &lt;br /&gt;
&amp;lt;/mbean&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;mbean &lt;br /&gt;
code="org.jboss.monitor.services.NotificationListener"&lt;br /&gt;
name="jboss.monitor:service=NotificationListener"&amp;gt;&lt;/p&gt;
&lt;p&gt;&amp;lt;attribute name="SubscriptionList"&amp;gt;&lt;br /&gt;
&amp;lt;subscription-list&amp;gt;&lt;br /&gt;
&amp;lt;mbean &lt;br /&gt;
name="jboss.monitor:service=MemoryMonitor"&amp;gt;&lt;br /&gt;
&amp;lt;notification type="jboss.alarm.memory.low"/&amp;gt;&lt;br /&gt;
&amp;lt;/mbean&amp;gt;&lt;br /&gt;
&amp;lt;/subscription-list&amp;gt;&lt;br /&gt;
&amp;lt;/attribute&amp;gt;&lt;br /&gt;
&amp;lt;/mbean&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>snmp-adaptor support for dynamic subscriptions</title><link href="https://sourceforge.net/p/jboss/change-notes/275/" rel="alternate"/><published>2004-03-03T15:56:23Z</published><updated>2004-03-03T15:56:23Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.netc4aa8c8ea811db678ace71992a94befd37f33e1f</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;The snmp-adaptor has been upgraded to support &lt;br /&gt;
dynamic JMX notification subscriptions.&lt;/p&gt;
&lt;p&gt;This solves chicken/egg dependency problems between &lt;br /&gt;
the adaptor and the MBeans who's JMX notifications &lt;br /&gt;
need to be mapped to SNMP traps.&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;
/Dimitris&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>NotificationListener moved to org.jboss.monitor.services</title><link href="https://sourceforge.net/p/jboss/change-notes/274/" rel="alternate"/><published>2004-03-03T15:52:09Z</published><updated>2004-03-03T15:52:09Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.net218e51fca9836a16ecbdc1d966c27869b2ab6097</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;An example of utilising &lt;br /&gt;
org.jboss.system.ListenerServiceMBeanSupport to &lt;br /&gt;
monitor and print-out any kind of JMX notification.&lt;/p&gt;
&lt;p&gt;An interesting side-feature of this class, is that it can be &lt;br /&gt;
used to subscribe declaretively some external MBean for &lt;br /&gt;
notifications!&lt;/p&gt;
&lt;p&gt;Regards&lt;br /&gt;
Dimitris&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>org.jboss.system.ListenerServiceMBeanSupport enhanced</title><link href="https://sourceforge.net/p/jboss/change-notes/273/" rel="alternate"/><published>2004-03-03T15:31:01Z</published><updated>2004-03-03T15:31:01Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.neta5d22ec68333bf918a1444fc5de320248e8437c5</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;org.jboss.system.ListenerServiceMBeanSupport &lt;br /&gt;
baseclass now supports:&lt;/p&gt;
&lt;p&gt;a) explicit subscription/unsubscription control&lt;br /&gt;
b) the option to not monitor for new MBeans and &lt;br /&gt;
perform dynamic notification registrations&lt;br /&gt;
c) the option to specify a different MBean as the &lt;br /&gt;
receiver of the notifications&lt;/p&gt;
&lt;p&gt;Enjoy&lt;br /&gt;
Dimitris&lt;/p&gt;
&lt;p&gt;/**&lt;br /&gt;
* An abstract base class that provides for declarative &lt;br /&gt;
JMX notification&lt;br /&gt;
* subscription handling.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* A JBoss service that is in addition a &lt;br /&gt;
NotificationListener can&lt;br /&gt;
* subclass ListenerServiceMBeanSupport instead of &lt;br /&gt;
ServiceMBeanSupport&lt;br /&gt;
* and specify at run-time, inline in the MBean descriptor &lt;br /&gt;
using the&lt;br /&gt;
* SubscriptionList attribute, the set of &lt;br /&gt;
MBeans/notifications the&lt;br /&gt;
* service wants to subscribe/receive.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* Call subscribe(boolean dynamicSubscriptions) at &lt;br /&gt;
anytime to register to&lt;br /&gt;
* those MBeans and for those notifications that match &lt;br /&gt;
the specified criteria.&lt;br /&gt;
* Call unsubscribe() to unsubscribe for Notifications.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* If true is passed to subscribe() the baseclass will &lt;br /&gt;
monitor for&lt;br /&gt;
* registration events from the MBeanServer and &lt;br /&gt;
automatically subscribe&lt;br /&gt;
* to new instances of MBeans that match the &lt;br /&gt;
subscription criteria.&lt;br /&gt;
* Monitoring for unsubscribe events in not necessary, &lt;br /&gt;
since the MBeanServer&lt;br /&gt;
* automatically removes subscriptions to unregistering &lt;br /&gt;
MBeans.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* An alternative subscribe(boolean &lt;br /&gt;
dynamicSubscription, ObjectName listener)&lt;br /&gt;
* can be used to specify a different MBean as the &lt;br /&gt;
receiver of the&lt;br /&gt;
* subscribed notifications. The specified MBean must be &lt;br /&gt;
a NotificationListener.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* To handle the incoming notifications override the &lt;br /&gt;
handleNotification2()&lt;br /&gt;
* method. The usual handleNotification() method should &lt;br /&gt;
not be overriden,&lt;br /&gt;
* since it is used to monitor the incoming notifications &lt;br /&gt;
for registration&lt;br /&gt;
* events coming from the MBeanServer, before &lt;br /&gt;
delegating to&lt;br /&gt;
* handleNotification2(), in order to implement dynamic &lt;br /&gt;
subscriptions.&lt;br /&gt;
*&lt;br /&gt;
* @see ListenerServiceMBean&lt;br /&gt;
*&lt;br /&gt;
* REVISIONS&lt;br /&gt;
* =========&lt;br /&gt;
* 28/02/04, Dimitris Andreadis&lt;br /&gt;
*&lt;br /&gt;
* explicit subscribe()/unsubscribe() replaced implicit &lt;br /&gt;
start()/stop();&lt;br /&gt;
* dynamic subscription behaviour can be &lt;br /&gt;
enabled/disabled, plus it is&lt;br /&gt;
* now possible to specify an external MBean as &lt;br /&gt;
notification listener.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>New baseclass org.jboss.system.ListenerServiceMBeanSupport</title><link href="https://sourceforge.net/p/jboss/change-notes/272/" rel="alternate"/><published>2004-02-09T17:00:35Z</published><updated>2004-02-09T17:00:35Z</updated><author><name>Dimitris Andreadis</name><uri>https://sourceforge.net/u/andd/</uri></author><id>https://sourceforge.net1cd6557aa6daf0bc7af529b216fda090348d6f39</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;/**&lt;br /&gt;
* An abstract base class that provides for declarative &lt;br /&gt;
JMX notification&lt;br /&gt;
* subscription handling.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* A JBoss service that is in addition a &lt;br /&gt;
NotificationListener can&lt;br /&gt;
* subclass ListenerServiceMBeanSupport instead of &lt;br /&gt;
ServiceMBeanSupport&lt;br /&gt;
* and specify at instantiation-time, inline in the MBean &lt;br /&gt;
descriptor using&lt;br /&gt;
the&lt;br /&gt;
* SubscriptionList attribute, the set of &lt;br /&gt;
MBeans/notifications the&lt;br /&gt;
* service wants to subscribe/receive.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* Just before start() the baseclass will register to those &lt;br /&gt;
MBeans and for&lt;br /&gt;
* those notifications that match the specified criteria. &lt;br /&gt;
Similarly,&lt;br /&gt;
* just after stop() the baseclass will automatically &lt;br /&gt;
unsubscribe.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* In addition, while started, it will monitor for &lt;br /&gt;
registration events&lt;br /&gt;
* from the MBeanServer and automatically subscribe to &lt;br /&gt;
new instances&lt;br /&gt;
* of MBeans that match the subscription criteria. &lt;br /&gt;
Monitoring for&lt;br /&gt;
* unsubscribe events in not necessary, since the &lt;br /&gt;
MBeanServer&lt;br /&gt;
* automatically removes subscriptions to unregistering &lt;br /&gt;
MBeans.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* Moreover, unless the service is properly started &lt;br /&gt;
(state == STARTED)&lt;br /&gt;
* all incoming notifications will be consumed.&lt;br /&gt;
* &amp;lt;p&amp;gt;&lt;br /&gt;
* To handle the incoming notifications override the &lt;br /&gt;
handleNotification2()&lt;br /&gt;
* method. The usual handleNotification() method should &lt;br /&gt;
not be overriden,&lt;br /&gt;
* since it is used to monitor the incoming notifications &lt;br /&gt;
for registration&lt;br /&gt;
* events coming from the MBeanServer, before &lt;br /&gt;
delegating to&lt;br /&gt;
* handleNotification2().&lt;br /&gt;
**/&lt;/p&gt;
&lt;p&gt;There is also a NotificationListener that demonstrates &lt;br /&gt;
the usage of the base&lt;br /&gt;
class:&lt;/p&gt;
&lt;p&gt;(from monitoring-service.xml, uncomment to activate)&lt;/p&gt;
&lt;p&gt;&amp;lt;!-- Example of listening for notifications from JBoss &lt;br /&gt;
monitors&lt;/p&gt;
&lt;p&gt;&amp;lt;mbean &lt;br /&gt;
code="org.jboss.monitor.notifications.NotificationListener"&lt;br /&gt;
name="jboss.jmx:service=NotificationListener"&amp;gt;&lt;br /&gt;
&amp;lt;attribute name="SubscriptionList"&amp;gt;&lt;br /&gt;
&amp;lt;subscription-list&amp;gt;&lt;br /&gt;
&amp;lt;mbean name="jboss.monitor:*"&amp;gt;&lt;br /&gt;
&amp;lt;notification &lt;br /&gt;
type="JBOSS_MONITOR_NOTIFICATION"/&amp;gt;&lt;br /&gt;
&amp;lt;/mbean&amp;gt;&lt;br /&gt;
&amp;lt;/subscription-list&amp;gt;&lt;br /&gt;
&amp;lt;/attribute&amp;gt;&lt;br /&gt;
&amp;lt;/mbean&amp;gt;&lt;br /&gt;
--&amp;gt;&lt;/p&gt;
&lt;p&gt;(The above example with the proper output formating is &lt;br /&gt;
more or less&lt;br /&gt;
equivalent to the ConsoleAlertListener, but without the &lt;br /&gt;
dependencies - I'll&lt;br /&gt;
come back with suggestions...)&lt;/p&gt;
&lt;p&gt;You may specify arbitrary subscription rules, like:&lt;/p&gt;
&lt;p&gt;&amp;lt;subscription-list&amp;gt;&lt;br /&gt;
&amp;lt;mbean name="*:service=invoker,*" &lt;br /&gt;
handback="aHandbackString"/&amp;gt;&lt;br /&gt;
&amp;lt;mbean &lt;br /&gt;
name="JMImplementation:type=MBeanServerDelegate"&amp;gt;&lt;br /&gt;
&amp;lt;notification type="JMX.mbean.registered"/&amp;gt;&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/mbean&lt;br /&gt;
[...]&lt;br /&gt;
&amp;lt;/subscription-list&amp;gt;&lt;/p&gt;
&lt;p&gt;or even:&lt;br /&gt;
&amp;lt;mbean name="*:*"/&amp;gt;&lt;/p&gt;
&lt;p&gt;You can easily monitor a single MBean, or the whole &lt;br /&gt;
MBean server. You just&lt;br /&gt;
need to specify what to do with those Notifications.&lt;/p&gt;
&lt;p&gt;Hope you find this useful. I've put a DTD at&lt;br /&gt;
system/src/resources/org/jboss/metadata/jboss-&lt;br /&gt;
subscription.dtd&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>CMP field &amp;lt;state-factory&amp;gt;</title><link href="https://sourceforge.net/p/jboss/change-notes/271/" rel="alternate"/><published>2003-11-28T22:12:49Z</published><updated>2003-11-28T22:12:49Z</updated><author><name>Alexey Loubyansky</name><uri>https://sourceforge.net/u/loubyansky/</uri></author><id>https://sourceforge.netb62f100383b6035af18aed1928739564dd9ee5e7</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;In jbosscmp-jdbc.xml, a cmp-field may have an optional&lt;br /&gt;
element &amp;amp;lt;state-factory&amp;amp;gt;. The value should the fully&lt;br /&gt;
qualified class name of the implementation of&lt;br /&gt;
org.jboss.ejb.plugins.cmp.jdbc.CMPFieldStateFactory&lt;br /&gt;
interface which has the following two methods:&lt;/p&gt;
&lt;p&gt;/**&lt;br /&gt;
* Calculates and returns an object that represents&lt;br /&gt;
the state of the field value.&lt;br /&gt;
* The states produced by this method will be used&lt;br /&gt;
to check whether the field&lt;br /&gt;
* is dirty at synchronization time.&lt;br /&gt;
*&lt;br /&gt;
* @param fieldValue  field's value.&lt;br /&gt;
* @return an object representing the field's state.&lt;br /&gt;
*/&lt;br /&gt;
Object getFieldState(Object fieldValue);&lt;/p&gt;
&lt;p&gt;/**&lt;br /&gt;
* Checks whether the field's state &amp;amp;lt;code&amp;amp;gt;state&amp;amp;lt;/code&amp;amp;gt;&lt;br /&gt;
* is equal to the field value's state (possibly,&lt;br /&gt;
calculated with&lt;br /&gt;
* the &amp;amp;lt;code&amp;amp;gt;getFieldState()&amp;amp;lt;/code&amp;amp;gt; method).&lt;br /&gt;
*&lt;br /&gt;
* @param state  the state to compare with field&lt;br /&gt;
value's state.&lt;br /&gt;
* @param fieldValue  field's value, the state of&lt;br /&gt;
which will be compared&lt;br /&gt;
*                    with &amp;amp;lt;code&amp;amp;gt;state&amp;amp;lt;/code&amp;amp;gt;.&lt;br /&gt;
* @return  true if &amp;amp;lt;code&amp;amp;gt;state&amp;amp;lt;/code&amp;amp;gt; equals to&lt;br /&gt;
&amp;amp;lt;code&amp;amp;gt;fieldValue&amp;amp;lt;/code&amp;amp;gt;'s state.&lt;br /&gt;
*/&lt;br /&gt;
boolean isStateValid(Object state, Object fieldValue);&lt;/p&gt;
&lt;p&gt;There are default implementations for Map, List, Set&lt;br /&gt;
and arrays which are set automatically for fields of&lt;br /&gt;
the corresponding types.&lt;br /&gt;
For primitives, their wrappers and java.lang.String,&lt;br /&gt;
the implementation relies on equals(Object o) method to&lt;br /&gt;
check the dirty state.&lt;br /&gt;
The default implementation for other types always&lt;br /&gt;
returns false from isStateValid() unless one of the&lt;br /&gt;
arguments is null and the other one is not.&lt;/p&gt;&lt;/div&gt;</summary></entry><entry><title>&amp;lt;check-dirty-after-get&amp;gt;</title><link href="https://sourceforge.net/p/jboss/change-notes/270/" rel="alternate"/><published>2003-11-28T20:51:23Z</published><updated>2003-11-28T20:51:23Z</updated><author><name>Alexey Loubyansky</name><uri>https://sourceforge.net/u/loubyansky/</uri></author><id>https://sourceforge.net5b80bcfbb5b9d2cd997e6e45c09725c101dafb7b</id><summary type="html">&lt;div class="markdown_content"&gt;&lt;p&gt;A &amp;amp;lt;cmp-field&amp;amp;gt; in jbosscmp-jdbc.xml has got an optional&lt;br /&gt;
&amp;amp;lt;check-dirty-after-get&amp;amp;gt; element which can contain true&lt;br /&gt;
or false.&lt;/p&gt;
&lt;p&gt;&amp;amp;lt;cmp-field&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;field-name&amp;amp;gt;myCMPField&amp;amp;lt;/field-name&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;check-dirty-after-get&amp;amp;gt;true&amp;amp;lt;/check-dirty-after-get&amp;amp;gt;&lt;br /&gt;
&amp;amp;lt;/cmp-field&amp;amp;gt;&lt;/p&gt;
&lt;p&gt;If field's type is mutable and its value can be changed&lt;br /&gt;
without invoking its setter, e.g.&lt;br /&gt;
myBean.getMyCMPField().setValue(), the field should&lt;br /&gt;
have check-dirty-after-get set to true.&lt;br /&gt;
Value true means that the field will be checked for&lt;br /&gt;
dirty state at synchronization time even if only the&lt;br /&gt;
getter was invoked in a transaction.&lt;/p&gt;
&lt;p&gt;By default, check-dirty-after-get is set to false only&lt;br /&gt;
for primitive, its wrapper and java.lang.String types.&lt;/p&gt;
&lt;p&gt;WARN: if the BLOB type is immutable the&lt;br /&gt;
check-dirty-after-get should be false.&lt;/p&gt;&lt;/div&gt;</summary></entry></feed>