[Messaging, JMS & JBossMQ] - Re: How to access JBOSS by providing IP address
by priyarao234
Hi Kiran,,.. dats fine like that i can access my server with ip address...... But in my program how can i configured that JBOSS configuration..... if the Server is running in my machine i can provide the following code and it works fine....
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,
"org.jnp.interfaces.NamingContextFactory");
env.put(Context.URL_PKG_PREFIXES,
"=org.jboss.naming:org.jnp.interfaces");
env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
....................
But if i'm using the server which is running in another machine then how can i configure that server.
if i tried like below it shows an error....
....
....
env.put(Context.PROVIDER_URL, "jnp://192.116.23.25:1099");
So plz tell me or post the code and tell me what configuraion (if required) i have to make in the server machine.....
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149133#4149133
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149133
17 years, 11 months
[JBoss Cache: Core Edition] - Re: Create an eviction Region with a non empty nodeEventQueu
by Sancheski
I have a requirement in my application that forces me to create eviction policies to regions once the whole system is running (that is, the cache has already started and is runnning properly).
What I am triying to do is to configure an eviction policy programatically. Here is how I am doing it:
public final void addEvictionPolicy(EvictionPolicy evictionPolicy, EvictionConfiguration evictionConfig, String fqn)
| {
| // Activate eviction Policies
| RegionManager regionMgr = getUnderlyingTreeCache().getEvictionRegionManager();
| if (regionMgr.hasRegion(fqn)) {
| Region region = regionMgr.getRegion(fqn);
| region.setEvictionConfiguration(evictionConfig);
| logger.debug("Region[{}] configured with {}", fqn, evictionPolicy);
| } else {
| evictionPolicy.configure(getUnderlyingTreeCache());
| try {
| regionMgr.createRegion(fqn, evictionPolicy, evictionConfig);
| } catch (RegionNameConflictException e) {
| logger.error("Region Name conflict", e);
| }
| logger.debug(
| "Region[{}] does not exist in RegionManager. Created and configured with {}",
| fqn, evictionPolicy);
| }
| }
I do not know if there is a better way to create an eviction policy dinamically. Does any one know how to do it properly?
Thanks!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4149131#4149131
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4149131
17 years, 11 months