[Design of Messaging on JBoss (Messaging/JBoss)] - LoadMessages problem during merge...
by clebert.suconic@jboss.com
An user reported to me about a problem that happened to him once during merge:
PagingChannelSupport couldn't load the the exact number of messages:
| java.lang.IllegalStateException: Did not load correct number of messages, wanted:3331 but got:3330
| at org.jboss.messaging.core.impl.PagingChannelSupport.processReferences(PagingChannelSupport.java:579)
| at org.jboss.messaging.core.impl.PagingChannelSupport.doLoad(PagingChannelSupport.java:497)
| at org.jboss.messaging.core.impl.MessagingQueue.mergeIn(MessagingQueue.java:223)
| at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.performFailover(MessagingPostOffice.java:2918)
| at org.jboss.messaging.core.impl.postoffice.MessagingPostOffice.nodesLeft(MessagingPostOffice.java:917)
| at org.jboss.messaging.core.impl.postoffice.GroupMember$ControlMembershipListener$1ViewChangeRunnable.run(GroupMember.java:489)
| at java.lang.Thread.run(Thread.java:595)
|
I'm trying to replicate the issue, but this makes me wonder about two things:
I - What should we do when an exception happens on Merge?
Right now the serve becomes unstable and nothing works after that. The Failover is interrupted, merges are not disconnected and some other problems are happening.
II - Can we just ignore the message, and produce a WARN on logs instead of interrupting the failover?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086337#4086337
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086337
18 years, 6 months
[Design the new POJO MicroContainer] - Microcontainer + Guice
by alesj
Another quick thing I hacked up - this time during vacation (yup, I know, I suck at 100% relaxing) and finalized while waiting for jbossas trunk to be Mavenized.
What you can do now is these three approaches of MC + Guice integration:
1) programmatically
| Injector injector = Guice.createInjector(new AbstractModule()
| {
| protected void configure()
| {
| bind(Controller.class).toInstance(controller);
| bind(Singleton.class).toProvider(GuiceIntegration.fromMicrocontainer(Singleton.class, "singleton"));
| bind(Prototype.class).toProvider(GuiceIntegration.fromMicrocontainer(Prototype.class, "prototype"));
| }
| });
|
2) through metadata
| AbstractBeanMetaData injectorBean = new AbstractBeanMetaData("injector", GuiceInjectorFactory.class.getName());
| AbstractConstructorMetaData constructor = new AbstractConstructorMetaData();
| constructor.setFactoryClass(GuiceInjectorFactory.class.getName());
| constructor.setFactoryMethod("createInjector");
| List<ParameterMetaData> parameters = new ArrayList<ParameterMetaData>();
| parameters.add(new AbstractParameterMetaData(new AbstractDependencyValueMetaData(KernelConstants.KERNEL_NAME)));
| AbstractArrayMetaData array = new AbstractArrayMetaData();
| array.add(new AbstractValueMetaData(GuiceObject.ALL));
| parameters.add(new AbstractParameterMetaData(array));
| constructor.setParameters(parameters);
| injectorBean.setConstructor(constructor);
| controller.install(injectorBean);
|
| ControllerContext injectorContext = controller.getInstalledContext("injector");
| assertNotNull(injectorContext);
| Injector injector = (Injector)injectorContext.getTarget();
|
3) XML
| <bean name="injector" class="org.jboss.guice.plugins.GuiceInjectorFactory">
| <constructor factoryClass="org.jboss.guice.plugins.GuiceInjectorFactory" factoryMethod="createInjector">
| <parameter>jboss.kernel:service=Kernel</parameter>
| <parameter>
| <array>
| <bean name="BindAll" class="org.jboss.guice.plugins.AllGuiceObject">
| <constructor factoryClass="org.jboss.guice.plugins.AllGuiceObject" factoryMethod="getInstance"/>
| </bean>
| </array>
| </parameter>
| </constructor>
| </bean>
|
Or check out GuiceTestSuite. ;-)
I've commited the code --> adding new guice-int module.
Will add some docs asap.
OK, back to ProfileService ...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4086288#4086288
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4086288
18 years, 6 months