[Persistence, JBoss/CMP, Hibernate, Database] - Tx deadlock with read-only JDBC and EJB (JBoss 3.2.7) on SQL
by beamer908
This is a somewhat complicated scenario but here goes. I have an EJB app deployed to use Commit Option A running under 3.2.7. In this application, there are places where I do read-only JDBC calls for snippets of information for which I would rather not load the entity bean.
Basically, I'm getting SQL server thread deadlock between a thread that's executing a JDBC select and one that is executing an UPDATE coming from one of my EJB setters.
The weird thing is that the UPDATE is being blocked by the SELECT and the SELECT thread says that it has a wait type of NetworkIO in the Enterprise Manager.
I was under the assumption that even with commit option A enabled, I should still be able to do read-only JDBC queries without messing with the EJB layer.
The deadlock is definitely happening on the SQL server database itself though and eventually SQL server chooses a thread to kill.
I have tried enabling and disabling <row-locking> in my jbosscmp-jdbc.xml file and the problem persist.
Can anyone see anything fundamentally wrong with mixing these two given the read-only nature of the JDBC?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980559#3980559
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980559
19 years, 6 months
[JBoss Seam] - Re: Seam 1.1 beta 1
by gavin.king@jboss.com
Migration guide:
==========
* The renderParameters component was removed, use Seam page parameters
* Some functionality no longer works out-of-the-box for JPA implementations other than Hibernate. Either switch to Hibernate, or implement a PersistenceProvider for your JPA implementation. (In future we will provide PersistenceProvider implementations for popular JPA solutions.)
* Default scoping rules of @Out and @Factory have changed, to be better and more consistent, you may need to add an explicit scope in some rare cases.
* is no long supported, use
Known issues:
=========
* Ajax4JSF is not compatible with the JBoss 4.0.5 portal profile, so if you want to run the booking demo, install JBoss with the ejb3 profile.
* Portlet resize forgets the JSF view id (old bug).
* MyFaces 1.1.4 portal support is broken (in JBoss 4.0.5 portal profile), the workaround will be documented in the FAQ.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980558#3980558
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980558
19 years, 6 months
[EJB 3.0] - Re: check if a lazy property is loaded
by vboerchers
Thanks for the answer ablevine! It works exactly as you wrote. I've implemented some helper methods that does everything we need:
| public static String getObjectDescription(Object o)
| {
| if (o instanceof HibernateProxy)
| {
| LazyInitializer initializer = ((HibernateProxy) o)
| .getHibernateLazyInitializer();
| return initializer.getEntityName()
| + "#" + initializer.getIdentifier();
| }
| return o.toString();
| }
|
This one is also nice:
| public static boolean canBeUsed(Object o)
| {
| if (o instanceof HibernateProxy)
| {
| LazyInitializer initializer = ((HibernateProxy) o)
| .getHibernateLazyInitializer();
| // if already initialized - use it!
| if ( ! initializer.isUninitialized())
| return true;
| // if the session still works - use it!
| return initializer.getSession() != null
| && initializer.getSession().isOpen();
| }
| return true;
| }
|
The ultimative cure for LazyInitializationExceptions is a combination of canBeUsed() and a dedicated service that does something like that:
| mEm.find(Class.forName(initializer.getEntityName())
| , initializer.getIdentifier());
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980557#3980557
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980557
19 years, 6 months
[Management, JMX/JBoss] - Problem with notification filter?
by java123
I have a listener bean that subscribes to some of the monitoring beans. I am trying to filter notification coming from "JMImplementation:type=MBeanServerDelegate" with type "JMX.mbean.registered" and "JMX.mbean.unregistered". I have added mbean to my subscription list with filter attributes but it doesn't seem to work.
Ant ideas?
| <mbean code="com.bfm.app.monitoring.ViewserverJMXNotificationHandler"
| name="jboss.monitor:service=ViewserverMonitoring" >
| <attribute name="SubscriptionList">
| <subscription-list>
| <mbean name="jboss.monitor:service=MemoryMonitor">
| <notification type="jboss.alarm.memory"/>
| </mbean>
| <mbean name="jboss.monitor:service=JDBCMonitor">
| <notification type="jboss.notification.jdbc"/>
| </mbean>
| <mbean name="jboss.system:service=Logging,type=JMXNotificationAppender">
| <notification type="jboss.notification.logging"/>
| </mbean>
| <mbean name="JMImplementation:type=MBeanServerDelegate">
| <filter factory="NotificationFilterSupportFactory">
| <enable type="JMX.mbeank"/>
| </filter>
| </mbean>
| </subscription-list>
| </attribute>
| </mbean>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980556#3980556
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980556
19 years, 6 months
[JBossCache] - Using JBossCache for session management
by pharvener
All,
We are using JBossCache as means of distributing/replicating session state across a cluster of application servers.
We use the "CacheMode">INVALIDATION_SYNC . To my understanding, using this cache mode, the actual cache state exists on only one server and all other servers maintain a placeholder for an individual entry. If a server attempts to get a cache entry which it only has a placeholder for, it forces a replication to occur. The cache entry replicated to the server requesting the cache item. The original server holding cache item is reset to be a placeholder and life goes on.
What happens when the application server crashes, who is holding the actual entry state information. It appears the other servers, holding placeholders complain and throw exceptions.
Is it possible to force JBossCache to automatically remove stale entries; those whose state is stored on a faulted server
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3980552#3980552
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3980552
19 years, 6 months