[Beginners Corner] - Migrating JBoss 4.0.5 to 5.0 Problems
by mattc@landslide.com
Hello,
We are in the process of migrating our web application from JBoss 4.0.5 to 5.0. We use an older version of AJAX4JSF pretty extensively in the app would also like to move to Richfaces during this process. We can get most of the application working but we ran into problems where Servlets were forwarding to JSP pages using commands like:
((HttpServletRequest) request).getSession().getServletContext().getRequestDispatcher( "/main.jsp").forward(request, response)
This work fine with 4.0 and JSF 1.1 but in JBoss 5 and 1.2 we get different errors. Sometimes we get a StackOverflowException (looks like JSF is calling get or setAttribute) or we get NULL pointers down in calls that originate from code like
application.createValueBinding("#controller}").getValue(facesContext)
I have spent a good amount of time on this and can't seem to get anywhere. At first I thought it was perhaps an old JAR file or something along those lines but I have not made any progress. Here is a little more info on the setup:
- JBoss 5.1
- RichFaces 3.x
- Tomahawk
Any advice would be most appreciated!
matt
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236197#4236197
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236197
16 years, 10 months
[JBossMQ] - JBoss-MQ â Problem in consuming message by MDB
by hardew
Hello friends,
I have configured and deployed MDB to consume messages from the remote queues; the remote queue is in Cluster Environment of JBoss ESB.
JBoss ESB: -Server
1. It is deployed on cluster environment
2. JBoss Messaging is used
3. Connection Factory - Custom Connection Factory
JBoss: (Where MDB is deployed) - Client
1. Not in cluster mode
2. JBoss using the JBoss MQ
MDB is able to receive messages from remote queues; however there is a problem I have experienced that is --
If MDB is idle for long time as there are no messages on the queues, if messages are available in the remote queue after long time then MDB is not able to consume those messages.
But when I restart the JBoss (where MDB has been deployed), MDB can consume those messages.
Can anyone explain why it is behaving like this?
Thanks,
Hardew
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236186#4236186
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236186
16 years, 10 months
[JBoss Cache: Core Edition] - distributed entity cache (invalidation based)
by josey
I am trying to deploy distributed caching for a single entity. I am running JBoss AS 5.1.0 with jdk 1.5. I have two nodes running on two separate servers in a single partition.
I see the caching work fine on each single node but the cache does not replicate/invalidate between the two nodes (I'd like to use invalidation).
Test case:
1. Ran a JUnit test that loaded the entity on node1 and node2 so it was in the cache on each node in the partition.
2. Ran a JUnit test that changed the entity on node1.
3. Ran a JUnit test that loaded the entity on node1 and node2.
>From looking at logging in both of the servers I can tell that node2 has the stale version (grabbed the entity from its cache instead of reloading it). I also have looked at the database log to verify that node2 did not try to load the entity when I requested it after it was changed by node1.
I added this to my entity class:
| import org.hibernate.annotations.Cache;
| import org.hibernate.annotations.CacheConcurrencyStrategy;
|
| @Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL)
|
I added this to my persistence unit.
| <property name="hibernate.cache.use_second_level_cache" value="true"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory"/>
| <property name="hibernate.cache.region.jbc2.cachefactory" value="java:CacheManager"/>
| <property name="hibernate.cache.region.jbc2.cfg.entity" value="mvcc-entity"/>
| <!-- Removing this had no effect
| <property name="hibernate.cache.region.jbc2.cfg.query" value="timestamps-cache"/>
| -->
|
Is there some other attribute that must be set in order to have a node notify the other nodes in the partition when a cached entity has changed? mvcc-entity has the property cacheMode set to INVALIDATION_SYNC. I figured that would do it. I also tried using pessimistic-entity but had no luck.
The only change that I have made to jboss-cache-manager-jboss-beans.xml is to set the multiplexer property to ${jboss.default.jgroups.stack:tcp} (did not want to use udp). I did this for each cache entry in this file.
For example,
| <!-- A config appropriate for entity/collection caching that uses MVCC locking -->
| <entry><key>mvcc-entity</key>
| <value>
| <bean name="MVCCEntityCache" class="org.jboss.cache.config.Configuration">
|
| <!-- Node locking scheme -->
| <property name="nodeLockingScheme">MVCC</property>
| <!-- READ_COMMITTED is as strong as necessary for most
| 2nd Level Cache use cases. -->
| <property name="isolationLevel">READ_COMMITTED</property>
| <property name="useLockStriping">false</property>
|
| <!-- Mode of communication with peer caches.
| INVALIDATION_SYNC is highly recommended as the mode for use
| with entity and collection caches. -->
| <property name="cacheMode">INVALIDATION_SYNC</property>
|
| <!-- Name of cluster. Needs to be the same for all members -->
| <property name="clusterName">${jboss.partition.name:DefaultPartition}-mvcc-entity</property>
| <!-- Use a UDP (multicast) based stack. A udp-sync stack might be
| slightly better (no JGroups FC) but we stick with udp to
| help ensure this cache and others like timestamps-cache
| that require FC can use the same underlying JGroups resources.
| <property name="multiplexerStack">${jboss.default.jgroups.stack:udp}</property>
| -->
|
| <!-- Use TCP -->
| <property name="multiplexerStack">${jboss.default.jgroups.stack:tcp}</property>
|
| <!-- Whether or not to fetch state on joining a cluster. -->
| <property name="fetchInMemoryState">false</property>
|
| <!-- The max amount of time (in milliseconds) we wait until the
| state (ie. the contents of the cache) are retrieved from
| existing members at startup. Ignored if FetchInMemoryState=false. -->
| <property name="stateRetrievalTimeout">60000</property>
|
| <!-- Number of milliseconds to wait until all responses for a
| synchronous call have been received. -->
| <property name="syncReplTimeout">17500</property>
|
| <!-- Max number of milliseconds to wait for a lock acquisition -->
| <property name="lockAcquisitionTimeout">15000</property>
|
| <!-- Hibernate 2LC can replicate custom types, so we use marshalling -->
| <property name="useRegionBasedMarshalling">true</property>
| <!-- Must match the value of "useRegionBasedMarshalling" -->
| <property name="inactiveOnStartup">true</property>
|
| <!-- Disable asynchronous RPC marshalling/sending -->
| <property name="serializationExecutorPoolSize">0</property>
| <!-- We have no asynchronous notification listeners -->
| <property name="listenerAsyncPoolSize">0</property>
|
| <property name="evictionConfig">
| <bean class="org.jboss.cache.config.EvictionConfig">
| <property name="wakeupInterval">5000</property>
| <!-- Overall default -->
| <property name="defaultEvictionRegionConfig">
| <bean class="org.jboss.cache.config.EvictionRegionConfig">
| <property name="regionName">/</property>
| <property name="evictionAlgorithmConfig">
| <bean class="org.jboss.cache.eviction.LRUAlgorithmConfig">
| <!-- Evict LRU node once we have more than this number of nodes -->
| <property name="maxNodes">10000</property>
| <!-- And, evict any node that hasn't been accessed in this many seconds -->
| <property name="timeToLiveSeconds">1000</property>
| <!-- Don't evict a node that's been accessed within this many seconds.
| Set this to a value greater than your max expected transaction length. -->
| <property name="minTimeToLiveSeconds">120</property>
| </bean>
| </property>
| </bean>
| </property>
| <property name="evictionRegionConfigs">
| <list>
| <!-- Don't ever evict modification timestamps -->
| <bean class="org.jboss.cache.config.EvictionRegionConfig">
| <property name="regionName">/TS</property>
| <property name="evictionAlgorithmConfig">
| <bean class="org.jboss.cache.eviction.NullEvictionAlgorithmConfig"/>
| </property>
| </bean>
| </list>
| </property>
| </bean>
| </property>
| </bean>
| </value>
| </entry>
|
Thanks.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236185#4236185
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236185
16 years, 10 months
[JBoss Messaging] - Re: OrderingGroup and Transaction Rollback
by mclu
Thx for explanation.
But still, why is my message after the rollback not the next message, which is delivered by the JMS System.
I still have this reproduceable:
1, Rollbackmsg(first try) , 2, 3 , Rollbackmsg(second try), ... , Rollbackmsg(last try)
( simplified: A, B, C, D, B, B, B, B, B)
behaviour
instead of the expected:
1, Rollbackmsg(first try), Rollbackmsg(second try), ... , Rollbackmsg(last try), 2, 3
( simplified: A, B, B, B, B, B, B, C, D )
I think is must have something to do with this session.close() call which removes the reference from the Orderinggroup....
Can you explain? Bug or Feature :-)?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236174#4236174
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236174
16 years, 10 months
[Management, JMX/JBoss] - Problem with JMX authentication
by ccesar
Hi!
It is my first time on this forum, so I hope someone can help me :)
I'm trying to use authentication on my JMX console, but I have no sucess. I have already done this:
I let the file:
deploy/jmx-console.war/WEB-INF/jboss-web.xml
With the following data:
| <jboss-web>
| <security-domain>java:/jaas/jmx-console</security-domain>
| </jboss-web>
|
(enabling the JMX auth).
In the file web.xml (.), I have taken out the comments for the security constraint, so the file is with the following data:
| <?xml version="1.0"?>
| <!DOCTYPE web-app PUBLIC
| "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
| "http://java.sun.com/dtd/web-app_2_3.dtd">
|
| <web-app>
| <description>The standard web descriptor for the html adaptor</description>
| <!--
| <filter>
| <filter-name>JmxOpsAccessControlFilter</filter-name>
| <filter-class>org.jboss.jmx.adaptor.html.JMXOpsAccessControlFilter</filter-class>
| <init-param>
| <param-name>updateAttributes</param-name>
| <param-value>UpdateAttributeRole</param-value>
| <description>Comma-delimited Roles that define the JMX Operation denoting updation of Attributes</description>
| </init-param>
| <init-param>
| <param-name>invokeOp</param-name>
| <param-value>InvokeOpRole</param-value>
| <description>Comma-delimited Roles that define the JMX Operation denoting Invocation of Operations</description>
| </init-param>
| </filter>
| <filter-mapping>
| <filter-name>JmxOpsAccessControlFilter</filter-name>
| <servlet-name>HtmlAdaptor</servlet-name>
| </filter-mapping>
| -->
| <servlet>
| <servlet-name>HtmlAdaptor</servlet-name>
| <servlet-class>org.jboss.jmx.adaptor.html.HtmlAdaptorServlet</servlet-class>
| </servlet>
| <servlet>
| <servlet-name>ClusteredConsoleServlet</servlet-name>
| <servlet-class>org.jboss.jmx.adaptor.html.ClusteredConsoleServlet</servlet-class>
| <init-param>
| <param-name>jgProps</param-name>
| <param-value>UDP(ip_mcast=true;ip_ttl=16;loopback=false;mcast_addr=${jboss.partition.udpGroup:228.1.2.3};mcast_port=${jboss.partition.udpPort:45566}):
| org.jboss.jmx.adaptor.control.FindView
| </param-value>
| <description>The JGroups protocol stack config</description>
| </init-param>
| </servlet>
| <servlet>
| <servlet-name>DisplayMBeans</servlet-name>
| <jsp-file>/displayMBeans.jsp</jsp-file>
| </servlet>
| <servlet>
| <servlet-name>InspectMBean</servlet-name>
| <jsp-file>/inspectMBean.jsp</jsp-file>
| </servlet>
| <servlet>
| <servlet-name>DisplayOpResult</servlet-name>
| <jsp-file>/displayOpResult.jsp</jsp-file>
| </servlet>
| <servlet>
| <servlet-name>ClusterView</servlet-name>
| <jsp-file>/cluster/clusterView.jsp</jsp-file>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>HtmlAdaptor</servlet-name>
| <url-pattern>/HtmlAdaptor</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>ClusteredConsoleServlet</servlet-name>
| <url-pattern>/cluster/ClusteredConsole</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>DisplayMBeans</servlet-name>
| <url-pattern>/DisplayMBeans</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>InspectMBean</servlet-name>
| <url-pattern>/InspectMBean</url-pattern>
| </servlet-mapping>
| <servlet-mapping>
| <servlet-name>DisplayOpResult</servlet-name>
| <url-pattern>/DisplayOpResult</url-pattern>
| </servlet-mapping>
|
| <security-constraint>
| <web-resource-collection>
| <web-resource-name>HtmlAdaptor</web-resource-name>
| <description>An example security config that only allows users with the
| role JBossAdmin to access the HTML JMX console web application
| </description>
| <url-pattern>/*</url-pattern>
| <http-method>GET</http-method>
| <http-method>POST</http-method>
| </web-resource-collection>
| <auth-constraint>
| <role-name>JBossAdmin</role-name>
| </auth-constraint>
| </security-constraint>
|
| <login-config>
| <auth-method>BASIC</auth-method>
| <realm-name>JBoss JMX Console</realm-name>
| </login-config>
|
| <security-role>
| <role-name>JBossAdmin</role-name>
| </security-role>
| </web-app>
|
And in the end I added the users ( "example=passwd" and "example=JBossAdmin" ) on the file jmx-console-users.properties, but after I restart the JBoss server, I still haven't got it enabled...
Is there something else to add that I forgot to do?
tks,
Caio Ribeiro Cesar
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236173#4236173
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236173
16 years, 10 months
[JBoss jBPM] - jBPM4 Spring Error while deploying process definition
by rams.rapol
When i try to deploy a process definition in jBPM4, i run into this issue..
Caused by: org.springframework.transaction.IllegalTransactionStateException: No existing transaction found for transaction marked with propagation 'mandatory'
at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:363)
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:125)
at org.jbpm.pvm.internal.tx.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:76)
at org.jbpm.pvm.internal.svc.EnvironmentInterceptor.execute(EnvironmentInterceptor.java:54)
at org.jbpm.pvm.internal.svc.RetryInterceptor.execute(RetryInterceptor.java:55)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedList(AbstractQuery.java:70)
at org.jbpm.pvm.internal.query.AbstractQuery.untypedUniqueResult(AbstractQuery.java:76)
at org.jbpm.pvm.internal.query.ProcessDefinitionQueryImpl.uniqueResult(ProcessDefinitionQueryImpl.java:151)
at edu.apollogrp.taskengine.workflow.logic.impl.JbpmWorkflowDeployerImpl.isProcessDeployed(JbpmWorkflowDeployerImpl.java:77)
... 32 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4236168#4236168
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4236168
16 years, 10 months