[Design of JBoss Transaction Services] - Re: Listen address of JBossTS ports not configurable
by adrian@jboss.org
"mark.little(a)jboss.com" wrote : [
| Presumably you'd want this capability even if you were running JBossTS stand-alone, i.e., outside of JBossAS? If that's the case, any way we attempt to address this should work with the JBossAS approach, but not be dependant on it.
|
The JBossAS approach is to inject a bind address:
//@Inject
setBindAddress(String address);
and then the configuration is usually done form a system property
| <attribute name="BindAddress">${jboss.bind.address}</attribute>
|
But IMHO this is a bad way to do it. There should really be a way
to inject a ServerSocketFactory which allows a lot more configuration
of what the properties are and what protocol, e.g. ssl
In fact, my real opinion is that you should do the reverse and provide
an implementation of an interface like the following:
void run(InputStream is, OutputStream os) throws IOException {}
a bit like a servlet container or IIOP and then the host (e.g. JBoss)
decides how those streams are constructed and invokes your interface
to handle it.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063880#4063880
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063880
18 years, 9 months
[Design of JBossCache] - Consolidate delegating cache loader classes [JBCACHE-1134]
by galder.zamarreno@jboss.com
This thread is to discuss http://jira.jboss.com/jira/browse/JBCACHE-1134.
Here's a summary of my thoughts taken from JIRA:
In the org.jboss.cache.loader package, we have:
o.j.c.l.DelegatingCacheLoader and
o.j.c.l.AbstractDelegatingCacheLoader
The second one was created by me when I first created SingletonStoreCL (doh!). I refactored common code from AsyncCL to AbstractDelegatingCL and made AsyncCL and SingletonStoreCL extend it.
I have just spotted DelegatingCacheLoader which is extended by LocalDelegatingCacheLoader and TcpDelegatingCacheLoader.
The difference between the classes extending DelegatingCacheLoader and the classes extending AbstractDelegatingCacheLoader is:
Classes extending DelegatingCacheLoader (LocalDelegatingCacheLoader/TcpDelegatingCacheLoader) are standalone classloaders that delegate to other cache instances. ClusteredCacheLoader could be defined as a refined delegating cache loader in comparison to LDCL and TDCL, in the sense that they delegate get() calls, but don't delegate put() calls because replication takes care of it.
Classes extending AbstractDelegatingCacheLoader are decorators of other
class loaders that delegate to cache loaders instead of other caches. As such, AbstractDelegatingCacheLoader adds getCacheLoader()/setCacheLoader() methods that help the interaction between the decorator cache loader and the real cache loader.
So, this is what I'm proposing:
- two interfaces, one for CLs that delegate to caches and one for CLs that delegate to CLs.
- provide abstract implementations for these interfaces with common functionality.
- refactor CL implementations to adhere to this hierarchy. This should include making ClusteredCacheLoader implement the interface or extend the abstract implementation, of a CL that delegates to another cache taking in account that it only delegates get() operations.
Thoughts?
p.s. interfaces need a bit more baking to define the names and the contract...etc.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063877#4063877
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063877
18 years, 9 months