[Clustering/JBoss] - HASingleton-problem on >2 nodes
by greeneagle
Hi,
Up to now I've used 2 jboss-instances (4.0.5) where one special service has been configured as a hasingleton. I've never had any problem with it, everything worked fine.
But now my infrastructure has changed: I have 3 additional machines in the cluster but the mentioned special service should still run on one of two dedicated machines (due to load-balancing-purposes).
Let's say the different 'jbosses' on my machines are named A, B, C, D and E, machine A and B are the ones which are prepared to run the HASingleton-service
Now very strange behaviour occurs:
1.) The HASingleton-service will only be started if A or B are booted first. If e.g. 'C' is booted first and 'A' afterwards the HASingleton will not be started
2.) If I boot with sequence 'A-B-C' and stop 'A' afterwards 'B' will not start the HASingleton. But if I stop 'C' too, 'B' starts the HASingleton immediately - although 'C' is not configured for HASingleton.
Now my questions:
Did I misunderstood the concept of HASingleton? Is it necessary to configure each jboss in the cluster for HASingleton (means: deploy my Singleton-Service in 'deploy-hasingleton' on each machine)? In this case HASingleton would not fulfill my requirements and I have to find another solution
Or is just some additional configuration necessary to make this scenario working?
Thanks in advance,
Michael
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106712#4106712
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106712
18 years, 8 months
[JBoss Seam] - Re: How to invoking methods with parameters with Seam test?
by paradigmza
I tried ant and got the same error... (I used the ant file that is automatically created by Eclipse, and just added the testng task... and got the same error.
[testng] at org.testng.TestNG.main(TestNG.java:802)
| [testng] Caused by: java.lang.IllegalStateException: FileHandler@32237804[path= context=file:/D:/Workspace/Eclipse/TheNextStep-ejb/build/classes/ real=file:/D:/Workspace/Eclipse/TheNextStep-ejb/build/classes/] has no parent.
| [testng] at org.jboss.virtual.VFSUtils.addManifestLocations(VFSUtils.java:116)
| [testng] at org.jboss.deployers.plugins.structure.DefaultStructureBuilder.processContext(DefaultStructureBuilder.java:131)
| [testng] at org.jboss.deployers.plugins.structure.DefaultStructureBuilder.populateContext(DefaultStructureBuilder.java:89)
| [testng] ... 33 more
| [testng] FAILED CONFIGURATION: @BeforeClass init
| [testng] org.jboss.deployers.spi.IncompleteDeploymentException: Summary of incomplete deployments (SEE PREVIOUS ERRORS FOR DETAILS):
| [testng] *** DEPLOYMENTS IN ERROR: Name -> Error
| [testng] vfsfile:/D:/Workspace/Eclipse/TheNextStep-ejb/build/classes/ -> java.lang.IllegalStateException: FileHandler@32237804[path= context=file:/D:/Workspace/Eclipse/TheNextStep-ejb/build/classes/ real=file:/D:/Workspace/Eclipse/TheNextStep-ejb/build/classes/] has no parent.
| [testng] at org.jboss.embedded.DeploymentGroup.checkIncomplete(DeploymentGroup.java:151)
| [testng] at org.jboss.embedded.DeploymentGroup.process(DeploymentGroup.java:129)
| [testng] at org.jboss.embedded.Bootstrap.deployResourceBases(Bootstrap.java:307)
| [testng] at org.jboss.seam.mock.EmbeddedBootstrap.startAndDeployResources(EmbeddedBootstrap.java:14)
| [testng] at org.jboss.seam.mock.BaseSeamTest.startJbossEmbeddedIfNecessary(BaseSeamTest.java:1006)
| [testng] at org.jboss.seam.mock.BaseSeamTest.init(BaseSeamTest.java:931)
| [testng] at org.jboss.seam.mock.SeamTest.init(SeamTest.java:42)
| [testng] ... Removed 22 stack frames
| [testng] SKIPPED CONFIGURATION: @BeforeMethod begin
| [testng] SKIPPED CONFIGURATION: @AfterMethod end
| [testng] SKIPPED CONFIGURATION: @AfterClass cleanup
| [testng] SKIPPED: test
| [testng] ===============================================
| [testng] Ant test
| [testng] Tests run: 1, Failures: 0, Skips: 1
| [testng] Configuration Failures: 1, Skips: 3
| [testng] ===============================================
| [testng] ===============================================
| [testng] Ant suite
| [testng] Total tests run: 1, Failures: 0, Skips: 1
| [testng] Configuration Failures: 1, Skips: 3
| [testng] ===============================================
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106706#4106706
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106706
18 years, 8 months
[JBossCache] - Re: JBossCache with Hibernate on Glassfish v2
by eric.hubert
"genman" wrote :
| I don't personally have a problem with wanting to know about these things
|
With due respect I wouldn't care much about you having those problems. ;)
I read through the official JBoss Cache documentation as well as some outdated wiki entries which did help me to get a starting point but which were not sufficient to solve my problems in a timely manner. That's why I kindly asked for some help and pointers into the right direction.
Nobody can really be sure that he hadn't overseen some "obvious" source of information. At least that's what I thought might be the case. Ideally one only had to pick a couple of libraries (jbosscache.jar) as well as a very few dependencies and change some configuration properties to use JBossCache on a specific application server. That's exactly the information I was looking for. I see inspecting the source of an open source project I would like to use as a kind of last resort, as this may require a tremendous effort. You can't be sure beforehand.
That doesn't mean that I'm not willing to do so if there is no other way. Of course I'm also happy to provide my findings for later reuse. Personally I don't see anything wrong with this approach. But back to topic!
So in this case I ended up inspecting the source of JBoss AS and JBoss Cache 2.0. I started with Hibernate's CacheProvider interface following it's concrete implementations of TreeCacheProviderHook as well as DeployedTreeCacheProvider.
In JBoss AS the Cache is wrapped in a MBean which is registered with the MBeanServer. In recent code the actual mbean server lookup was moved from concrete CacheProvider to a TransactionCacheFactory. Since JBoss Cache 2.0 this is JBCCacheFactory. It is responsible for connecting with the MBeanServer, retrieving an MBeanProxy of the Cache (in this case CacheJmxWrapperBean), read the caches configuration and evaluate the locking strategie and build the Cache appropriately.
I'm not quite sure if I can oversee anything from my first glance at the code, but the only obvious thing which is application server dependent is the way the MBeanServer is located. Unfortunately there was no standard way of doing this before JSE 5.0. Since then the preferred way is by using java.lang.management.ManagementFactory.getPlatformMBeanServer().
JBoss uses a utility class MBeanServerLocator to retrieve it's MBeanServer.
So at the moment I have to think about how to solve my problem best. I could write my own implementation of the CacheProvider interface. But would that be clever? It seems to be a good idea to also use the underlying logic of the CacheFactory.
If I got it right I had to register the CacheJmxWrapperBean with Glassfish's MBean-Server and change the way how the MBeanServer is located. Seems pretty simple, If that would be all. Well, I guess I'll see.
It might be a good idea to make the MBeanLookup-Code exchangeable.
Unfortunately at the moment I have no time to experiment on the code level. I will take some time at the weekend. If one of you had any further suggestions it will be more than welcome. :-)
Isolating issues in a non container environment is generally a good idea, but it doesn't seem practical for me in this special case. On the one hand I have a full blown JEE application and on the other hand my problems are not related to the cache and it's configuration but to container integration. Anyhow, genman, I thank you for your suggestions and pointers. Any assistance is greatly appreciated.
Regards,
Eric
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106705#4106705
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106705
18 years, 8 months
[JBoss Portal] - Exception in portlet
by prns
I am creating a portlet in which Jboss portal server and EJB 3.0 is used. My Portlet application throws exception sometimes. Icould not track how this exception is being thrown since it happens only sometimes and not always. Please see the stacktrace below for the details
Note: I am not modifying anything in database
Exception stact trace
javax.servlet.ServletException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
org.jboss.portal.server.servlet.PortalServlet.process(PortalServlet.java:321)
org.jboss.portal.server.servlet.PortalServlet.doPost(PortalServlet.java:168)
Causes:
org.hibernate.StaleStateException: Batch update returned unexpected row count from update: 0 actual row count: 0 expected: 1
org.hibernate.jdbc.BatchingBatcher.checkRowCount(BatchingBatcher.java:93)
org.hibernate.jdbc.BatchingBatcher.checkRowCounts(BatchingBatcher.java:79)
org.hibernate.jdbc.BatchingBatcher.doExecuteBatch(BatchingBatcher.java:58)
org.hibernate.jdbc.AbstractBatcher.executeBatch(AbstractBatcher.java:242)
org.hibernate.engine.ActionQueue.executeActions(ActionQueue.java:235)
Environment used
Application server: Jboss 4.0.4 GA
Portal Server: Jboss portal server 2.4.2
EJB: 3.0
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106703#4106703
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106703
18 years, 8 months
[JBoss Seam] - clickable dataTable: DataModelSelection or method parameter?
by MSchmidke
Hello all,
as far as I have understood, I have at least two possibilities to make a clickable list with h:dataTable.
The first option is to have the selected row injected per @DataModelSelection.
The second option is to have an action method with parameter, for example:
| <h:dataTable var="task" value="#{aufgabenFreigeber}">
| <h:column>
| <s:link action="#{aufgabenliste.onVersionBearbeiten(task)}">
| <h:outputText value="#{task.version.versionsnummer}" />
| </s:link>
| </h:column>
| </h:dataTable>
|
Either seems to work perfect, but are there differences? In my eyes, the method parameter way has several advantages:
- reduces the number of necessary injections (important since every injection must be done on every method call)
- multiple dataTables on one page may use the same action methods, no different DataModelSelection variables to evaluate
Does the DataModelSelection way also have advantages? If not, what is it for?
Marcus.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106701#4106701
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106701
18 years, 8 months
[JBossCache] - Re: Problem reading (deserializing) objects from FileCacheLo
by arjan
... No differerence.
So, let's summarize:
| [li]I have a TreeCache deployed as service (deploy/treecache-service.xml)[/li]
| [li]I access the TreeCache over JMX/JNDI (makes no differerence)[/li]
| [li]Using the FileCacheLoader fails with ClassNotFoundExceptions[/li]
| [li]Since TreeCache and my webapp are loaded with different classloaders, the MXBean invocation code switches the classloader to the TreeCache classloader for the duration of the MXBean call.[/li]
|
|
| It looks like the TreeCache is not using my registered class loader at all! (the MarshalledValueInputStream is trying to do it on it's own, without TreeCache's region information).
|
|
| This sounds all pretty plausible to me. But what should I do? Should I provide a special (web-app local) class loader for the region I use in my webapp?
|
| Pfffff.
|
| Arjan
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4106694#4106694
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4106694
18 years, 8 months