[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...
Gavin King
gavin.king at jboss.com
Tue Oct 10 22:18:51 EDT 2006
User: gavin
Date: 06/10/10 22:18:51
Modified: src/main/org/jboss/seam Component.java
Log:
work around CGLIB prob in Tomcat
Revision Changes Path
1.187 +18 -12 jboss-seam/src/main/org/jboss/seam/Component.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: Component.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
retrieving revision 1.186
retrieving revision 1.187
diff -u -b -r1.186 -r1.187
--- Component.java 11 Oct 2006 01:22:15 -0000 1.186
+++ Component.java 11 Oct 2006 02:18:51 -0000 1.187
@@ -109,7 +109,7 @@
*
* @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
* @author Gavin King
- * @version $Revision: 1.186 $
+ * @version $Revision: 1.187 $
*/
@Scope(ScopeType.APPLICATION)
public class Component
@@ -238,10 +238,7 @@
initInitializers(applicationContext);
- /*if (type==JAVA_BEAN)
- {*/
- factory = createProxyFactory();
- //}
+ //factory = createProxyFactory();
}
@@ -928,7 +925,7 @@
}
else
{
- Factory bean = factory.newInstance();
+ Factory bean = getFactory().newInstance();
initialize(bean);
bean.setCallback( 0, new JavaBeanInterceptor(this) );
callPostConstructMethod(bean);
@@ -938,11 +935,20 @@
private Object wrap(Object bean) throws Exception
{
- Factory proxy = factory.newInstance();
+ Factory proxy = getFactory().newInstance();
proxy.setCallback( 0, new ClientSideInterceptor(bean, this) );
return proxy;
}
+ private synchronized Class<Factory> getFactory()
+ {
+ if (factory==null)
+ {
+ factory = createProxyFactory();
+ }
+ return factory;
+ }
+
public void initialize(Object bean) throws Exception
{
if ( log.isDebugEnabled() ) log.debug("initializing new instance of: " + name);
More information about the jboss-cvs-commits
mailing list