[Design of JBoss Transaction Services] - TransactionManager doesnt allow to configure bind address
by jgra@vp.pl
Aparently there is no configuration parameter to specify bind IP for TM to listen (as far as I now) and TM allways binds to all interfaces on machine.
In JBoss App Srv ver. 4.2 configuration, TM creates 3 efemeric ports with bindings as stated above and it ignores JBoss run cmd address binding option (-b).
test-xen:/usr/local/jboss-4.2.1.GA/bin# netstat -lntp | grep java
| tcp 0 0 127.0.0.1:3873 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 0.0.0.0:34689 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:8009 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:1098 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:1099 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:8080 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 0.0.0.0:52723 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:4444 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:4445 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 127.0.0.1:4446 0.0.0.0:* LISTEN 8133/java
| tcp 0 0 0.0.0.0:43710 0.0.0.0:* LISTEN 8133/java
Quick look in App Srv sources shows that the problem is not about integration service for App Srv, but lack of such feature in TM Core which use ServerSocket ctor with only port argument.
>From security point of view it should be possible to bind TM to specific address using some config parameters.
Regards
Janusz Grabowski
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077383#4077383
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077383
18 years, 7 months
[Design of JBossCache] - Re: JBossCache Cache Mgmt interceptor hit/miss not collected
by mabc101
Thanks Manik for your prompt response.
I am including the section of the code from CacheMgmtInterceptor below.
As you can see the case statement for "get" which keeps hit/miss stats count, is for "getKeyValueMethodLocal" case only. If I call the method without the key (as indicated in my previous post), the default case is invoked, so the hit/miss count is not captured.
I believe this is by design and I just want to understand the semantic difference between the two cases, ie, using "get" without key has a different purpose (perhaps internally - like node visits for eviction etc - which logically should not increment the hit/miss count - but I am treading on this ice here) vs "get" with key which actually returns data and therefore should update the stats.
Here is the code segment:
==============================================
switch (m.getMethodId())
{
case MethodDeclarations.getKeyValueMethodLocal_id:
//fqn = (Fqn) args[0];
//key = args[1];
t1 = System.currentTimeMillis();
retval=super.invoke(m);
t2 = System.currentTimeMillis();
if (retval == null)
{
m_miss_times = m_miss_times + (t2 - t1);
m_misses++;
}
else
{
m_hit_times = m_hit_times + (t2 - t1);
m_hits++;
}
break;
case MethodDeclarations.putKeyValMethodLocal_id:
case MethodDeclarations.putFailFastKeyValueMethodLocal_id:
//fqn = (Fqn) args[1];
//key = args[2];
//value = args[3];
t1 = System.currentTimeMillis();
retval=super.invoke(m);
t2 = System.currentTimeMillis();
m_store_times = m_store_times + (t2 - t1);
m_stores++;
break;
case MethodDeclarations.putDataMethodLocal_id:
case MethodDeclarations.putDataEraseMethodLocal_id:
//fqn = (Fqn) args[1];
attributes = (Map)args[2];
t1 = System.currentTimeMillis();
retval=super.invoke(m);
t2 = System.currentTimeMillis();
if (attributes != null && attributes.size() > 0)
{
m_store_times = m_store_times + (t2 - t1);
m_stores = m_stores + attributes.size();
}
break;
case MethodDeclarations.evictNodeMethodLocal_id:
case MethodDeclarations.evictVersionedNodeMethodLocal_id:
//fqn = (Fqn) args[0];
retval=super.invoke(m);
m_evictions++;
break;
default :
retval=super.invoke(m);
break;
}
return retval;
}
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077280#4077280
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077280
18 years, 7 months
[Design of JBossCache] - Re: JBoss Cache and JBoss MC
by manik.surtani@jboss.com
I'd like to use the MC to wire together cache internals. The cache is basically few core objects (CacheImpl, UnversionedNode) some services (CacheLoaderManager, RPCManager, Notifier, CacheMarshaller, BuddyReplicationManager) and a bunch of interceptors in front of the core objects (TxInterceptor, CacheLoaderInterceptor, etc etc). The relationship between these objects are all controlled by the cache.create() method when the cache starts, which uses a Configuration object to determine which services and interceptors are needed and how they are configured.
This is where I think the MC can help; where the services and interceptors can be configured in a beans.xml file, which would control the implementations of each service/interceptor used as well as their relationship, e.g., inject a notifier into the NotificationInterceptor, a CacheLoaderManager into a CacheLoaderInterceptor, etc etc.
Regarding end users configuring a -beans.xml file, I would like to expose this as a possibility for "advanced" users, but also provide a much simpler configuration file for more typical use cases (no customisation of interceptors, notifiers, rpc managers, etc., but simple stuff like eviction policies, cache loaders as well as timeouts, cache modes, etc).
Maybe a well-designed cache-specific schema would allow me to achieve both in a single file.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4077238#4077238
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4077238
18 years, 7 months