Sorry mark - someday I'll learn to run my mailer 8^})
marc fleury wrote:
>
> When a bean doesn't pass the verifier it is "undeployed" and in
> our case the LRU cache barf an NPE.
>
> It doesn't look very good and probably has to do with some
> "non-initialized" field that is supposed to do some work.
>
> We can predictably say that people will screw their deployment
> and the error they get is container NPE which is confusing.
>
> Can someone take a look at it? No don't point the fingers back at
> me, I am running on the training.
Here's a patch that fixes this. The root of the problem is that the
cache stuff expects 'init' to be called before 'stop', which doesn't
neccesarily happen when deployment fails. This patch just null-protects
a few things in stop or methods called from stop.
Index: LRUCachePolicy.java
===================================================================
RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/util/LRUCachePolicy.java,v
retrieving revision 1.7
diff -r1.7 LRUCachePolicy.java
173a174,177
> //we can can here without being init'ed
> if (m_list == null)
> return;
>
Index: AbstractInstanceCache.java
===================================================================
RCS file:
/cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/AbstractInstanceCache.java,v
retrieving revision 1.5
diff -r1.5 AbstractInstanceCache.java
360c360,361
< m_passivator.stop();
---
> if (m_passivator != null)
> m_passivator.stop();
362c363
< if (isJMSMonitoringEnabled())
---
> if (isJMSMonitoringEnabled() && m_jmsConnection != null)
375c376
< if (isJMSMonitoringEnabled())
---
> if (isJMSMonitoringEnabled() && m_jmsConnection != null)
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development