[OJB-developers] About connection pool and preparedstatement cache
Brought to you by:
thma
From: John W. <hw...@re...> - 2002-03-08 22:53:00
|
I noticed that for a class, it can only use the same connection, even for different users. So when 2 users are accessing the same class objects, they will share the same connection, and may cause some problem, right? In ConnectionManager.getConnectionForClassDescriptor, it will get from hashmap, so it will return the same for a classdescriptor. The preparedstatement is also cached in the StatementsforClass, which is good. I am just wondering whether it can live outside of a connection. Thanks a lot, John W ----- Original Message ----- From: "Georg Schneider" <ge...@me...> To: <obj...@li...> Sent: Friday, March 08, 2002 1:33 AM Subject: [OJB-developers] dynamic proxies > Hi, > > I just implemented a few lines to enable dynamic proxies to also implement > interfaces which are implemented by classes further up the inheritance > hierarchy. I just added the following lines in RepositoryXmlHandler in the > method getDynamicProxyClass: > > Class[] interfaces = clazz.getInterfaces(); > //added from here on > Class superClass = clazz; > > while((superClass = superClass.getSuperclass()) != null) { > > Class[] superInterfaces = superClass.getInterfaces(); > > Class[] combInterfaces = > new Class[interfaces.length + > superInterfaces.length]; > System.arraycopy(interfaces,0,combInterfaces,0, > interfaces.length); > System.arraycopy(superInterfaces,0,combInterfaces, > interfaces.length, > superInterfaces.length); > interfaces = combInterfaces; > } > //end added > > Class proxyClass = Proxy.getProxyClass( > clazz.getClassLoader(), interfaces); > > > Regards > > Georg > > > _______________________________________________ > Objectbridge-developers mailing list > Obj...@li... > https://lists.sourceforge.net/lists/listinfo/objectbridge-developers |