[Beginners Corner] - BMP ejbStore + Hibernate/har/JTA ?
by HSerg
When I'm trying to save BMP as: public void SampleBean.ejbStore() throws EJBException, RemoteException {
| try {
| Session hsession = myHelper.getCurrentSession();
| Session dynamicSession = hsession.getSession(EntityMode.MAP);
| dynamicSession.update(_objData);
| } catch (NamingException e) {
| e.printStackTrace();
| }
| }
I have a serious issue - SampleBean.ejbStore doesn't save data to DB, and in the same time, Hibernate is sure that all data is stored.
As you can see from stacktrace, Hibernate stores data into internal cache, but doesn't flush this data into DB. IMHO, it happens because the synchronizer isn't created, which in turn happens because another Hibernate synchronizer exists and executes before SampleBean.ejbStore call.
So, is it a software bug or incorrect configuration of my environment?
System Thread [RMI TCP Connection(2)-192.168.x.x] (Suspended (breakpoint at line 1543 in SampleBean))
| SampleBean.ejbStore() line: 1543
| NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
| NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
| DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
| Method.invoke(Object, Object...) line: 585
| BMPPersistenceManager.invokeEjbStore(EntityEnterpriseContext) line: 498
| CachedConnectionInterceptor.invokeEjbStore(EntityEnterpriseContext) line: 294
| EntityContainer.invokeEjbStore(EntityEnterpriseContext) line: 735
| GlobalTxEntityMap$2.invokeEjbStore(Thread, EntityEnterpriseContext) line: 132
| GlobalTxEntityMap$GlobalTxSynchronization.synchronize() line: 281
| GlobalTxEntityMap$GlobalTxSynchronization.beforeCompletion() line: 345
| TransactionImpl.doBeforeCompletion() line: 1491
| TransactionImpl.beforePrepare() line: 1110
| TransactionImpl.commit() line: 324
| TxInterceptorCMT.endTransaction(Invocation, Transaction, Transaction, int) line: 501
| TxInterceptorCMT.runWithTransactions(Invocation) line: 361
| TxInterceptorCMT.invoke(Invocation) line: 181
| LogInterceptor.invoke(Invocation) line: 205
| ProxyFactoryFinderInterceptor.invoke(Invocation) line: 136
| StatefulSessionContainer(SessionContainer).internalInvoke(Invocation) line: 648
| StatefulSessionContainer(Container).invoke(Invocation) line: 954
| GeneratedMethodAccessor87.invoke(Object, Object[]) line: not available
| DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
| Method.invoke(Object, Object...) line: 585
| ReflectedDispatcher.invoke(Invocation) line: 155
| Invocation.dispatch() line: 94
| Invocation.invoke() line: 86
| XMBean(AbstractMBeanInvoker).invoke(String, Object[], String[]) line: 264
| MBeanServerImpl.invoke(ObjectName, String, Object[], String[]) line: 659
| JRMPInvoker$MBeanServerAction.invoke(ObjectName, String, Object[], String[]) line: 819
| JRMPInvoker.invoke(Invocation) line: 420
| NativeMethodAccessorImpl.invoke0(Method, Object, Object[]) line: not available [native method]
| NativeMethodAccessorImpl.invoke(Object, Object[]) line: 39
| DelegatingMethodAccessorImpl.invoke(Object, Object[]) line: 25
| Method.invoke(Object, Object...) line: 585
| UnicastServerRef2(UnicastServerRef).dispatch(Remote, RemoteCall) line: 294
| Transport$1.run() line: 153
| AccessController.doPrivileged(PrivilegedExceptionAction<T>, AccessControlContext) line: not available [native method]
| TCPTransport(Transport).serviceCall(RemoteCall) line: 149
| TCPTransport.handleMessages(Connection, boolean) line: 466
| TCPTransport$ConnectionHandler.run() line: 707
| Thread.run() line: 595
org.jboss.tm.TransactionImpl.doBeforeCompletion() line: 1491
|
| this TransactionImpl (id=95)
| cause null
| done false
| gid GlobalId (id=122)
| heuristicCode 4
| lastBranchId 1
| lastResource TransactionImpl$Resource (id=126)
| lockDepth 0
| locked null
| resources ArrayList<E> (id=128)
| resourcesEnded false
| start 1186562997765
| status 0
| sync Synchronization[12] (id=141)
| [0] StatefulSessionInstanceInterceptor$InstanceSynchronization (id=5356)
| [1] CacheSynchronization (id=5349)
| ctx SessionImpl (id=5368)
| hibernateTransaction null
| jdbcContext JDBCContext (id=5370)
| transaction TransactionImpl (id=95)
| [2] JTASessionContext$CleanupSynch (id=5350)
| [3] TransactionSynchronizer (id=5351)
| [4] EntitySynchronizationInterceptor$InstanceSynchronization (id=5352)
| [5] GlobalTxEntityMap$GlobalTxSynchronization (id=94)
| instances ArrayList<E> (id=5384)
| synchronizing true
| this$0 GlobalTxEntityMap (id=5398)
| tx TransactionImpl (id=95)
| [6] EntitySynchronizationInterceptor$InstanceSynchronization (id=5353)
| [7] EntitySynchronizationInterceptor$InstanceSynchronization (id=5354)
| [8] EntitySynchronizationInterceptor$InstanceSynchronization (id=5355)
| [9] null
| [10] null
| [11] null
| syncAllocSize 12
| syncCount 9
| threads HashSet<E> (id=145)
| timeout TimeoutPriorityQueueImpl$TimeoutExtImpl (id=137)
| timeoutPeriod 300000
| trace true
| transactionLocalMap Collections$SynchronizedMap<K,V> (id=150)
| work null
| xid XidImpl (id=152)
| i 5
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071894#4071894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071894
18Â years, 8Â months
jboss management console
by Nayyar Ahmad
Hi,
I want to view connections, memory, transactions etc, status to my jboss
server, is there any comprehensive management console to do it.
thanks
--
Nayyar Ahmad
18Â years, 8Â months
[Clustering/JBoss] - HANamingService already bound to port 1100
by loumaus
Hi there .. sorry if this question has been asked before, but I did not find a valid response.
Starting a simple cluster, both nodes detect each other and the jmx-console reveals that both nodes are properly part of the cluster.
The only annoying thing happens during bootstrap of the second node:
10:01:35,077 INFO [Partition1] Number of cluster members: 2
10:01:35,117 INFO [Partition1] Other members: 1
10:01:35,154 INFO [Partition1] Fetching state (will wait for 3000 milliseconds):
10:01:35,298 INFO [Partition1] state was retrieved successfully (in 144 milliseconds)
10:01:35,433 ERROR [HANamingService] Could not start on port 1100
java.net.BindException: Address already in use
at java.net.PlainSocketImpl.socketBind(Native Method)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
at java.net.ServerSocket.bind(ServerSocket.java:319)
at java.net.ServerSocket.(ServerSocket.java:185)
at javax.net.DefaultServerSocketFactory.createServerSocket(ServerSocketFactory.java:169)
at org.jboss.ha.jndi.DetachedHANamingService.initBootstrapL
The first node in the cluster uses the HANamingService port 1100.
The second one tries to use it as well.
http://docs.jboss.org/jbossas/jboss4guide/r4/html/cluster.chapt.html#clus...
reveals that is you wanna use this service in different clusters, you should change the port number .
As both nodes are part of the same cluster I thought that they the service should share the same port, but the error log tells a different story.
Help is appreciated ..
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071885#4071885
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071885
18Â years, 8Â months