|
From: MacMahon, M. <M.M...@em...> - 2004-01-06 12:40:29
|
Hi All,
I have got a package of Spring configured objects that I would like to use
interchangeably in both a web application and
an EJB application (from SFSB).
Some of my Objects are BeanFactoryAware so that they can create on demand,
prototype instances of spring configured objects.
All works well in web application mode. However I cannot get it to work
reliably in ejb mode due to the fact that BeanFactory is not serializable -
exceptions on passivation of the SFSB.
Why isn't BeanFactory serializable? I can see that the Log class is being
stored as a member rather than a class variable in some of the spring
classes but surely this can be changed easily?
Shouldn't the BeanFactoryWare interface be documented so as to discourage
use of it in beans that are used in an EJB environment?
Is there any way that I can avoid reverting back to using a typical java
singleton for access to the BeanFactory for the scenario that I have
described (loading prototypes on demand)
I am also getting problems passivating the SFSB due to the fact that
AbstractEnterpriseBean stores its logger as a member rather than a class
variable:
Is this convenience really worth sacrificing serializable support?
abstract class AbstractEnterpriseBean implements EnterpriseBean
{
/** Logger, available to subclasses */
protected final Log logger = LogFactory.getLog(getClass());
//Change to static to support serializable
//private final static Log logger =
LogFactory.getLog(AbstractEnterpriseBean.class);
}
Please forgive me if I am addressing the wrong mailing list here!
Any help appreciated!
Thanks in advance!
Mark
____________________________________________________
emuse technologies
U24 Trinity Enterprise Centre, Pearse Street, Dublin 2, Ireland.
Tel: +353 (0)1 6717317 Fax: +353 (0)1 6717319
website: <http://www.emusetechnologies.com/>
email: in...@em... <mailto:in...@em...>
____________________________________________________
This message has been scanned for viruses using GroupShield for Exchange
Server.
CONFIDENTIALITY NOTICE - The information contained in this email message is
intended only for confidential use of the named recipient. If the reader is
not the intended recipient or the person responsible for delivering it to
the recipient, you are hereby notified that you have received this
communication in error and that any review, dissemination or copying of this
communication is strictly prohibited. If you have received this in error,
please notify the sender immediately.
The information, opinions and recommendations contained herein are and must
be construed solely as statements of opinion and not statements of fact. No
warranty, expressed or implied, as to the accuracy, timeliness,
completeness, merchantability or fitness for any particular purpose of any
such recommendation or information is given or made by emuse technologies in
any form or manner whatsoever.
|