[JBoss Cache: Core Edition] - Re: True Structure of Cache Node?
by bstansberry@jboss.com
genman is a significant JBoss Cache developer and he commented on it, correctly. :)
Single-key per node is very common. Hibernate Second Level Cache with JBC works that way. JBoss AS EJB3 StatefulSessionBean caching works that way. Some flavors of JBoss AS HttpSession caching work that way.
Whether you put a single key with a coarse grained value object or multiple keys with finer grained value objects depends on how you use the data, particularly how you update it after the initial placement in the cache. Multiple keys allow you to update a single key and just replicate that new value, avoiding re-replicating the other unchanged key/value pairs.
Note that updating/replicating just a single key/value is not advised if other values in the map share references to objects included in the replicated value's object graph. (Example: key "husband" and value Person object, key "wife" and value Person object, both Person objects share a ref to an Address object). This is because when an object is independently replicated, it is independently serialized/deserialized, and on the other cluster nodes shared references are broken (husband and wife no longer have a ref to the same Address object, rather 2 Address objects with -- initially -- the same data.)
If you are using INVALIDATION, multiple keys has no benefit as the invalidation message invalidates the entire node.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222650#4222650
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222650
15 years, 9 months
[Installation, Configuration & DEPLOYMENT] - Error while running application
by mrbmuneer
Hi,
I am getting the below shown exception during my application .
The same thing works fine with JBoss 'default' server configuration.But
moving it to the all configuration gives this exception and I am struck here.
I am using JBoss 3.2.8 with axis 1.1 .
Appreciate if some one can point to some solution
115728 WARN [pool-4-thread-1] org.apache.axis.configuration.EngineConfigurationFactoryFinder - Factory org.jboss.net.axis.server.JMXEngineConfigurationFactory Ignored: missing required method: public static EngineConfigurationFactory newFactory(Object).
115759 ERROR [pool-4-thread-1] org.apache.axis.AxisEngine - ConfigurationException:
org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassCastException: org.jboss.net.jmx.adaptor.MBeanConstructorInfoSerFactory
java.lang.ClassCastException: org.jboss.net.jmx.adaptor.MBeanConstructorInfoSerFactory
at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:277)
at org.apache.axis.deployment.wsdd.WSDDDeployment.deployMapping(WSDDDeployment.java:286)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getTypeMappingRegistry(WSDDDeployment.java:462)
at org.apache.axis.configuration.FileProvider.getTypeMappingRegistry(FileProvider.java:262)
at org.apache.axis.AxisEngine.getTypeMappingRegistry(AxisEngine.java:348)
at org.apache.axis.client.Service.getTypeMappingRegistry(Service.java:704)
at org.apache.axis.client.Service.setTypeMappingVersion(Service.java:904)
at com.infosys.gridworm.magi.client.JobManagementSoapBindingStub.(JobManagementSoapBindingStub.java:144)
at com.infosys.gridworm.magi.client.JobManagementSoapBindingStub.(JobManagementSoapBindingStub.java:134)
at com.infosys.gridworm.magi.client.MagiModelMapProxy.submitJob(MagiModelMapProxy.java:52)
at com.infosys.gridworm.wormserver.controller.ApplicationController.processElement(ApplicationController.java:362)
at com.infosys.gridworm.wormserver.controller.ApplicationController.run(ApplicationController.java:684)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
org.apache.axis.deployment.wsdd.WSDDException: java.lang.ClassCastException: org.jboss.net.jmx.adaptor.MBeanConstructorInfoSerFactory
java.lang.ClassCastException: org.jboss.net.jmx.adaptor.MBeanConstructorInfoSerFactory
at org.apache.axis.encoding.ser.BaseSerializerFactory.createFactory(BaseSerializerFactory.java:277)
at org.apache.axis.deployment.wsdd.WSDDDeployment.deployMapping(WSDDDeployment.java:286)
at org.apache.axis.deployment.wsdd.WSDDDeployment.getTypeMappingRegistry(WSDDDeployment.java:462)
at org.apache.axis.configuration.FileProvider.getTypeMappingRegistry(FileProvider.java:262)
at org.apache.axis.AxisEngine.getTypeMappingRegistry(AxisEngine.java:348)
at org.apache.axis.client.Service.getTypeMappingRegistry(Service.java:704)
at org.apache.axis.client.Service.setTypeMappingVersion(Service.java:904)
at com.infosys.gridworm.magi.client.JobManagementSoapBindingStub.(JobManagementSoapBindingStub.java:144)
at com.infosys.gridworm.magi.client.JobManagementSoapBindingStub.(JobManagementSoapBindingStub.java:134)
at com.infosys.gridworm.magi.client.MagiModelMapProxy.submitJob(MagiModelMapProxy.java:52)
at com.infosys.gridworm.wormserver.controller.ApplicationController.processElement(ApplicationController.java:362)
at com.infosys.gridworm.wormserver.controller.ApplicationController.run(ApplicationController.java:684)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Regards,
Muneer
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222643#4222643
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222643
15 years, 9 months
[JBoss Portal] - Single sign on
by aar
Hello everybody,
I need to implement a single sign-on solution for our portal. Here is the senario. We have a portal hosting several portlet applications. (I mean APPLICATIONS, different war files.) There is also a remote Identity management server somewhere else. When a portlet in our portal access some remote resource, it has to go through the identity managment server to get SAML assertion. My question is how can the portlets in different applications share the sign-on information. Let's say, portlet1 in app1 obtains SAML assertion and artifact. how can portlet2 in app2 use the SAML assertion and artifact when it access resouces of other systems so the portal user does not need to login again. Because portlet1 and portlet2 are in differenet war files (APPLICATIONS), how can portlet1 share the information with portlet2.
Thank you.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222641#4222641
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222641
15 years, 9 months
[JBossMQ] - Re: Improvement suggestions: Messaging in a clustered enviro
by adrian@jboss.org
bind.address:1100 should always be able to see things bound into jndi somewhere in the cluster.
Improvements:
* Use hajndi-jms-ds.xml to create a pool of connections (this is what is used in the "all" config anyway) bound at connection factory java:/JmsXA.
* Use jndi tricks to use the in-memory connector when co-located with the server
in which the singleton jms server is running
| <mbean code="org.jboss.naming.LinkRefPairService"
| name="jboss.jms:alias=MyConnectionFactory">
|
| <!-- jndi binding MyConnectionFactory -->
|
| <attribute name="JndiName">MyConnectionFactory</attribute>
|
| <!-- Use TCP/IP when remote -->
|
| <attribute name="RemoteJndiName">ConnectionFactory</attribute>
|
| <!-- Use the in-memory connector when local -->
|
| <attribute name="LocalJndiName">java:/ConnectionFactory</attribute>
| <depends>jboss:service=Naming</depends>
| </mbean>
|
* Use JBoss Messaging to get a proper clustered solution
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222638#4222638
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222638
15 years, 9 months
[JBoss Cache: Core Edition] - Failure to configure a cache with a TimeToLive expiration
by mortenhattesen
Using JBoss Cache 3.0.3-GA, I have not been able to configure a simple cache with a "TimeToLive" expiration.
Firstly, whenever the eviction thread wakes up, a warning is logged:
anonymous wrote : WARN org.jboss.cache.eviction.ExpirationAlgorithm - No expiration key 'expiration' for Node: /
Secondly, no eviction is being performed.
The configuration is reproduced in this unit-test code (the production code has the cache wired up using a Spring IOC context configuration):
| import static org.junit.Assert.assertEquals;
|
| import org.apache.log4j.Logger;
| import org.jboss.cache.Cache;
| import org.jboss.cache.DefaultCacheFactory;
| import org.jboss.cache.Node;
| import org.jboss.cache.config.Configuration;
| import org.jboss.cache.config.EvictionConfig;
| import org.jboss.cache.config.EvictionRegionConfig;
| import org.jboss.cache.eviction.ExpirationAlgorithmConfig;
| import org.junit.Test;
|
|
| public class TestJbossCacheConfig {
| private static final Logger logger = Logger.getLogger(TestJbossCacheConfig.class);
| final Cache<String, String> cache;
| private final long TIME_TO_LIVE = 1000;
| private Node<String, String> root;
|
| public TestJbossCacheConfig() {
| ExpirationAlgorithmConfig eac = new ExpirationAlgorithmConfig();
| eac.setTimeToLive(TIME_TO_LIVE);
|
| EvictionRegionConfig erc = new EvictionRegionConfig();
| erc.setRegionName("/");
| erc.setEvictionAlgorithmConfig(eac);
|
| EvictionConfig ec = new EvictionConfig();
| ec.setWakeupInterval(TIME_TO_LIVE / 2); //msec
| ec.setDefaultEvictionRegionConfig(erc);
|
| Configuration config = new Configuration();
| config.setEvictionConfig(ec);
|
| cache = new DefaultCacheFactory<String, String>().createCache(config);
| root = cache.getRoot();
| }
|
|
| @Test
| //@Ignore
| public void testEviction() throws InterruptedException {
|
| root.put("1", "one");
| root.put("2", "two");
|
| assertEquals("one", root.get("1"));
|
| assertEquals(2, root.dataSize());
|
| logger.info("Sleeps while eviction kicks in");
| Thread.sleep(TIME_TO_LIVE * 2);
| /*
| * During sleep:
| * "WARN org.jboss.cache.eviction.ExpirationAlgorithm - No expiration key 'expiration' for Node: /"
| */
|
| /*
| * java.lang.AssertionError: expected:<0> but was:<2>
| */
| assertEquals(0, root.dataSize());
| }
| }
What am I doing wrong here?
Another point: Although I know that JBoss cache is typically configured using an XML, or an IOC framework, it seems a little excessive to require four levels of nested configuration objects to configure a simple cache:
| configuration = new Configuration(new EvictionConfig(new EvictionRegionConfig(new ExpirationAlgorithmConfig())))
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4222631#4222631
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4222631
15 years, 9 months