[JBoss Messaging] - strange failover behaviour in clustered config
by ramazanyich
Hi,
I'm testing failover situations with JBOSS Messaging server 1.3GA running on jboss4.2.1GA (got it from branch as it is not yet released, but almost ready for release) on two node cluster.
I installed clustered jboss messaging server 1.3.0GA using release-admin.xml build script. And did additionally following changes on both nodes:
1. replaced hsqldb-persistence-service.xml by clustered-oracle-persistence-service.xml
2. added clustered queue in destination-service.xml:
<mbean code="org.jboss.jms.server.destination.QueueService"
name="jboss.messaging.destination:service=Queue,name=mytestqueue"
xmbean-dd="xmdesc/Queue-xmbean.xml">
<depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer
jboss.messaging:service=PostOffice
true
3. changed messagepullpolicy and clusterrouterfactory:
org.jboss.messaging.core.plugin.postoffice.cluster.DefaultMessagePullPolicy
org.jboss.messaging.core.plugin.postoffice.cluster.RoundRobinRouterFactory
4. added attributes for ConnectiontFactory and XAConnectionFactory in connection-factories-service.xml
true
true
In messaging-service.xml in one node put server peer id to 1 and on another node to 2.
I started both nodes. Pushed about 1000 JMS messages to the queue.
Deployed MDB which is listening on this queue and doing some staff with JMS messages.
So far so good.
Messages good spreaded across nodes. After some time I killed one node (will name it from now as node A).
I saw that messages are now was correctly overtaken by remaining node (node B).
And now I killed node B too. SO no nodes are running.
Then I started node A and it was no messages arriving to my MDB. I checked database and saw that messages were still there in JBM_MSG table.
Then I started node B and messages started to arrive to both node A and node B again.
How to avoid situation that existing messages are not delivered to the MDB ?
Is it by design ? or bug ?
Thanks in advance, Ramil
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063013#4063013
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063013
18Â years, 11Â months
[JBoss Seam] - Re: bug in exception handling ?
by lklm
Hi.
The same thing happens with Seam 2. No change here at all.
To my knowlegde end-conversation isn't possible in jpdl.xml.
I had env-conversation in pages.xml from the start, like:
| <exception class="java.lang.RuntimeException">
| <end-conversation/>
| <redirect view-id="/generalError.xhtml">
| <message>Unexpected failure</message>
| </redirect>
| </exception>
|
First request is redirected to generalError. Then I press back button in browser and request the same action and an endless loop occurs.
This seems to happen only in IE as when firefox encounters an endless redirect loop it ends it.
It seems that the conversation isn't ended for some reason or jbpm process isn't ended:
| java.lang.IllegalStateException: pageflow is not currently at a <page> or <start-page> node
| (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
| at org.jboss.seam.pageflow.Pageflow.getPage(Pageflow.java:215)
|
How can this be ?
What can I make to avoid it ?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063005#4063005
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063005
18Â years, 11Â months
[JBoss Seam] - Hibernate2 Problem
by ralscha
Hello
I found a strange behaviour with Hibernate2 Example in Seam 2.0.0B1.
I deployed the example into Tomcat and it starts fine. In the browser I see the homepage with the login form.
But everytime I start a request for example with "Register New User" or "Register" in the New User form the program prints the following log. It looks like everytime the program connects to the database it creates a new HibernateSessionFactory. So everytime it drops and creates the tables in the database because the SchemaExport tool is running.
Regards
Ralph
16:13:56,093 INFO [Configuration] configuring from resource: /hibernate.cfg.xml
|
| 16:13:56,109 INFO [Configuration] Configuration resource: /hibernate.cfg.xml
| 16:13:56,109 INFO [Configuration] Configured SessionFactory: null
| 16:13:56,109 INFO [AnnotationBinder] Binding entity from annotated class: org.j
| boss.seam.example.hibernate.Hotel
| 16:13:56,109 INFO [EntityBinder] Bind entity org.jboss.seam.example.hibernate.H
| otel on table Hotel
| 16:13:56,125 INFO [AnnotationBinder] Binding entity from annotated class: org.j
| boss.seam.example.hibernate.User
| 16:13:56,125 INFO [EntityBinder] Bind entity org.jboss.seam.example.hibernate.U
| ser on table Customer
| 16:13:56,125 INFO [AnnotationBinder] Binding entity from annotated class: org.j
| boss.seam.example.hibernate.Booking
| 16:13:56,125 INFO [EntityBinder] Bind entity org.jboss.seam.example.hibernate.B
| ooking on table Booking
| 16:13:56,140 INFO [NamingHelper] JNDI InitialContext properties:{}
| 16:13:56,140 INFO [DatasourceConnectionProvider] Using datasource: java:comp/en
| v/jdbc/TestDB
| 16:13:56,140 INFO [SettingsFactory] RDBMS: HSQL Database Engine, version: 1.7.2
|
| 16:13:56,156 INFO [SettingsFactory] JDBC driver: HSQL Database Engine Driver, v
| ersion: 1.7.2
| 16:13:56,156 INFO [Dialect] Using dialect: org.hibernate.dialect.HSQLDialect
| 16:13:56,156 INFO [TransactionFactoryFactory] Transaction strategy: org.hiberna
| te.transaction.JDBCTransactionFactory
| 16:13:56,156 INFO [TransactionManagerLookupFactory] No TransactionManagerLookup
| configured (in JTA environment, use of read-write or transactional second-level
| cache is not recommended)
| 16:13:56,156 INFO [SettingsFactory] Automatic flush during beforeCompletion():
| enabled
| 16:13:56,156 INFO [SettingsFactory] Automatic session close at end of transacti
| on: disabled
| 16:13:56,156 INFO [SettingsFactory] JDBC batch size: 15
| 16:13:56,171 INFO [SettingsFactory] JDBC batch updates for versioned data: disa
| bled
| 16:13:56,171 INFO [SettingsFactory] Scrollable result sets: enabled
| 16:13:56,171 INFO [SettingsFactory] JDBC3 getGeneratedKeys(): disabled
| 16:13:56,171 INFO [SettingsFactory] Connection release mode: auto
| 16:13:56,171 INFO [SettingsFactory] Default batch fetch size: 1
| 16:13:56,171 INFO [SettingsFactory] Generate SQL with comments: disabled
| 16:13:56,171 INFO [SettingsFactory] Order SQL updates by primary key: disabled
| 16:13:56,171 INFO [SettingsFactory] Query translator: org.hibernate.hql.ast.AST
| QueryTranslatorFactory
| 16:13:56,171 INFO [ASTQueryTranslatorFactory] Using ASTQueryTranslatorFactory
| 16:13:56,187 INFO [SettingsFactory] Query language substitutions: {}
| 16:13:56,187 INFO [SettingsFactory] JPA-QL strict compliance: disabled
| 16:13:56,187 INFO [SettingsFactory] Second-level cache: enabled
| 16:13:56,187 INFO [SettingsFactory] Query cache: disabled
| 16:13:56,187 INFO [SettingsFactory] Cache provider: org.hibernate.cache.Hashtab
| leCacheProvider
| 16:13:56,187 INFO [SettingsFactory] Optimize cache for minimal puts: disabled
| 16:13:56,187 INFO [SettingsFactory] Structured second-level cache entries: disa
| bled
| 16:13:56,187 INFO [SettingsFactory] Statistics: disabled
| 16:13:56,187 INFO [SettingsFactory] Deleted entity synthetic identifier rollbac
| k: disabled
| 16:13:56,187 INFO [SettingsFactory] Default entity-mode: pojo
| 16:13:56,203 INFO [SessionFactoryImpl] building session factory
| 16:13:56,218 INFO [SessionFactoryObjectFactory] Not binding factory to JNDI, no
| JNDI name configured
| 16:13:56,218 INFO [SchemaExport] Running hbm2ddl schema export
| 16:13:56,234 INFO [SchemaExport] exporting generated schema to database
| 16:13:56,234 INFO [SchemaExport] Executing import script: /import.sql
| 16:13:56,234 INFO [SchemaExport] schema export complete
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063004#4063004
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063004
18Â years, 11Â months
[JBoss Seam] - Re: EntityHome usage recommended?
by maku01
"denis-karpov" wrote : What ever you do, you will need some functionality in your application that is already in EntityHome. At least, I suggest you to examine sources of it and catch the ideas and approaches . Then you can try to reuse it.
I know, I already have a common class which is responsible for generic tasks like update, remove and so on. But I thought it would be better to use one base class which is written by an orm and hibernate and jpa guru like gavin king (and jsf and seam of course) :-)
What I not really like with the EntityHome approach ist the boundary to JSF (e.g. the automatically generated messages as result of an db operation) and the membering of the entity instance. Additionally in my base dao class I've generic list methods and I feel that the membering of the instance doesn't fit so well!
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4063001#4063001
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4063001
18Â years, 11Â months
[JBoss Seam] - @Restrict referencing objects in Seam context
by mtpettyp
Looking at the @Restrict annotation I see that any objects in the Seam Context can be referenced (such as 'selectedAccount' below):
@Name("account")
| public class AccountAction {
| @In Account selectedAccount;
| @Restrict("#{s:hasPermission('account','modify',selectedAccount)}")
| public void modify() {
| selectedAccount.modify();
| }
| }
However, I can't see a way to pass in an arbitrary number of Seam Context objects without explicity specifying the componentName and methodName as part of a "s:hasPermission" in the @Restrict value.
This is a bit of a limitation when trying to secure components on a derived EntityHome class. I've specified a number of instances in components.xml which use my derived EntityHome, but their name is not available to pass to the annotation.
I'd rather not have to write a separate derived EntityHome class with @Name annotation specified to get around this limitation for each EJB entity I'm dealing with.
Am I missing something simple here? Or should I log this as a feature request?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062997#4062997
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062997
18Â years, 11Â months