[Clustering/JBoss] - JBOSS 4.0.4 GA clustering problem
by neiliusmaximus
I've installed JBOSS 4.0.4 GA using the "ejb3 clustered" option. The server runs on two machines, and the cluster seems to be created successfully (membership changes are visible in the server output).
I'm trying to deploy a simple stateless session bean to the cluster. It runs locally. The class is annotated with the "@Cluster" tag. When I deploy it I only see the deployment on the local machine. Nothing happens on the other member of the cluster. Should I see it being deployed there also?
I also have created a test client which calls a method on the session bean. I expected this to fallover to the other member of the cluster when the server is stopped on the local machine, but instead I get an exception (see below).
One thing I've noticed is that there is no "farm" folder in this version. I'm deploying the session bean to the standard deploy folder. Should I be creating this folder or configuring something within JBOSS?
Could the fallover problem be related to the RetryInterceptor. I've read somthing about this and my configuration is the default SingleRetryInterceptor. Could the problem be related to this?
Thanks,
Neil
Exception in thread "main" java.lang.RuntimeException: cluster invocation failed, last exception was:
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:129)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.tx.ClientTxPropagationInterceptor.invoke(ClientTxPropagationInterceptor.java:61)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.security.SecurityClientInterceptor.invoke(SecurityClientInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.remoting.IsLocalInterceptor.invoke(IsLocalInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.ejb3.stateless.StatelessClusteredProxy.invoke(StatelessClusteredProxy.java:100)
at $Proxy0.sayHello(Unknown Source)
at ie.fbn.ejb.test.TestForum.main(TestForum.java:40)
Caused by: org.jboss.remoting.CannotConnectException: Can not get connection to server. Problem establishing socket connection.
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:267)
at org.jboss.remoting.RemoteClientInvoker.invoke(RemoteClientInvoker.java:143)
at org.jboss.remoting.Client.invoke(Client.java:525)
at org.jboss.remoting.Client.invoke(Client.java:488)
at org.jboss.aspects.remoting.InvokeRemoteInterceptor.invoke(InvokeRemoteInterceptor.java:55)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
at org.jboss.aspects.remoting.ClusterChooserInterceptor.invoke(ClusterChooserInterceptor.java:74)
... 10 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.(Socket.java:365)
at java.net.Socket.(Socket.java:178)
at org.jboss.remoting.transport.socket.SocketClientInvoker.createSocket(SocketClientInvoker.java:535)
at org.jboss.remoting.transport.socket.SocketClientInvoker.getConnection(SocketClientInvoker.java:471)
at org.jboss.remoting.transport.socket.SocketClientInvoker.transport(SocketClientInvoker.java:263)
... 16 more
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966772#3966772
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966772
19 years, 8 months
[Advanced Documentation] - session timeout does not invalidate the SSO
by mtolbert
I am using JBoss SSO on an application that consists of multiple WAR's and the application needs to track when a users session (SSO) is created and destroyed. I have implemented an HttpListener and defined it in web.xml. Unfortunately, when one webapp (WAR) session invalidates/times out it doesn't necessarily mean that all sessions in all webapps have been invalidated for that user. Therefore, this approach doesn't accomplish what I need, which is track when a users SSO gets created and destroyed.
It would be nice if there was some sort of SSOListener that could be implemented. This SSOListener might be invoked when the SSO is created and destroyed, and have methods like ssoCreated() and ssoDestroyed().
Is there a hook to tell when a SSO gets created and destroyed?
FYI- This is my SSO configuration for JBoss
-- server.xml --
turned on valve: org.apache.catalina.authenticator.SingleSignOn
-- jboss-service.xml --
Disabled SSO caching by setting DefaultCacheTimeout and DefaultCacheResolution to 0.
Any assistance would be appreciated.
-Mike
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966769#3966769
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966769
19 years, 8 months
[EJB 3.0] - Re: Container will hang when persisting a large number of ob
by pash_ka
I have a simmilar problem... I'm inserting about 12 000 Entities in the DB, and after about 8000 it craches thithe the same "Cannot open connection" exception.
The problem is, that connection is obtained and released for each call to persist(). See hibernate log:
| 2006-08-22 21:50:44,889 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2006-08-22 21:50:44,889 DEBUG [org.hibernate.SQL] insert into Team (razdel, kod) values (?, ?)
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 15842
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 1) (open ResultSets: 0, globally: 0)]
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] executing identity-insert immediately
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 1)
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.SQL] insert into TeamName (team_id, lang, name) values (?, ?, ?)
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 31683
| 2006-08-22 21:50:44,905 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 1) (open ResultSets: 0, globally: 0)]
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] executing identity-insert immediately
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 1)
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.SQL] insert into TeamName (team_id, lang, name) values (?, ?, ?)
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 31684
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to close PreparedStatement (open PreparedStatements: 1, globally: 2)
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] aggressively releasing JDBC connection
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] releasing JDBC connection [ (open PreparedStatements: 0, globally: 1) (open ResultSets: 0, globally: 0)]
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.event.def.AbstractSaveEventListener] executing identity-insert immediately
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.AbstractBatcher] about to open PreparedStatement (open PreparedStatements: 0, globally: 1)
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.jdbc.ConnectionManager] opening JDBC connection
| 2006-08-22 21:50:44,920 DEBUG [org.hibernate.SQL] insert into Team (razdel, kod) values (?, ?)
| 2006-08-22 21:50:44,936 DEBUG [org.hibernate.id.IdentifierGeneratorFactory] Natively generated identity: 15843
I think there is also perfomance problem here, but don't know how to avoid this.
More info here: http://forum.hibernate.org/viewtopic.php?t=963671
I've checked ConnectionPool Mbean and found there is no connection leak. Only one connection were used for this task.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966768#3966768
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966768
19 years, 8 months
[JBoss Eclipse IDE (users)] - Re: JBoss Eclipse IDE 2.0.0.Alpha released! - NOT WORKING
by gduan2000
"kristof_taveirne" wrote : Hi,
| Can somebody explain me how deployment should be done now with this new version?
|
| with Eclipse 3.1.2 I used to have a menuitem when i click on the .ear file: Deploy to ...
|
| With the jBoss IDE 2.0.0a I can't find a way to deploy to my server.
|
| I see the menu-item "Add/Remove projects" in the Jboss Server View, but then I get a dialog box saying: There are no projects that can be added or removed from the server.
|
| Also I noticed that I can drag a .ear file to the serveritem in the Jboss Server View, and then select deploy and verify, but nothing seems to be happening. At least not in the console window.
|
| Can somebody explain me what I'm doing wrong? If this stuff is simply not yet working, I will have to go back to eclipse 3.1.2 because I didn't get Jboss IDE 1.6 to work on 3.2 with callisto.
|
| Grtz,
| Kristof.
This is exactly what I got after switching to eclipse 3.2 and jboss ide 2.0 a1. Can someone help?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966763#3966763
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966763
19 years, 8 months
[EJB 3.0] - update to Hibernate 3.2cr3
by pash_ka
I could not find update for Hibernate 3.2cr3 so tried to do it myself.
There are 2 files needed for update - hibernate3.jar in lib dir and hibernate-client.jar in client dir.
The first one is available from http://sourceforge.net/project/showfiles.php?group_id=40712&package_id=12..., but the second one - not.
I've checked the JBoss-EJB3 http://fisheye.jboss.org/viewrep/JBoss/jboss-ejb3/build.xml, found the code for building hibernate-client.jar, changed it a bit and pasted to build.xml of hibernate bundle.
Here is the code:
<target name="client" depends="jar"
| description="JBoss EJB3 hibernate-client.jar">
| <!-- build hibernate-client.jar -->
| <!-- <unjar src="${hibernate.hibernate.lib}/hibernate3.jar"
| dest="${build.classes}" /> -->
| <jar jarfile="${dist.dir}/hibernate-client.jar">
| <zipfileset src="${jar.path}">
| <include name="org/hibernate/AssertionFailure.class"/>
| <include name="org/hibernate/**/*Exception.class"/>
| <include name="org/hibernate/collection/**"/>
| <include name="org/hibernate/exception/Nestable*.class"/>
| <include name="org/hibernate/exception/ExceptionUtils.class"/>
| <include name="org/hibernate/engine/SessionImplementor.class"/>
| <include name="org/hibernate/loader/CollectionAliases.class"/>
| <include name="org/hibernate/persister/collection/**"/>
| <include name="org/hibernate/pretty/MessageHelper.class"/>
| <include name="org/hibernate/type/Type.class"/>
| <include name="org/hibernate/EntityMode.class"/>
| <include name="org/hibernate/util/**"/>
| <include name="org/hibernate/proxy/**"/>
| </zipfileset>
| </jar>
| </target>
|
Just add it after the last and build using "build client".
For those who don't like building yourself i've uploaded it http://slil.ru/23046264.
sverker, maybe you can check it yourself and make a new copy of your build?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966761#3966761
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966761
19 years, 8 months
[JBossCache] - Re: Blob balancer using cache - concept help
by manik.surtani@jboss.com
"zambak" wrote :
|
| 1) Since image will be uploaded and stored in the DB via admin part, can I use the same BLOB column when I configure JDBC based cache loader. I mean are the BLOBs compatible (as in case with File cache loader the map is serialized so image file and cached file are not the same, is it same true for JDBC loader?) If they are not compatible, then I am going to have to waste some DB space (duplicate BLOBS in DB one BLOB is app specific, one is for cache right?)....
|
|
This is irrelevant since you will always be using the cache to read or write the contents of that blob. The reason it was a problem with the File Cache Loader was that you were trying to serve up the file directly using your webserver.
"zambak" wrote :
| 2) In order to evict an item when a new image with a same name is uploaded (an update) will I need to have a listener perform this action logic?
|
| If I understand this correctly, the listener would add/remove/update blobs in the cache every time admin action adds/removes/updates an image. Then we rely on cache achitecture to propagate same behavior across the cluster.
|
| So we have add/update/remove image (in admin)
|
| 1) store/restore/reupdate image as a BLOB in DB (depending on concern outlined in #1)
| 2) add image as byte[] to cache
| 3) action in #2 will notify the listeners on all nodes and recreate/remove image from byte[] onto a disk
|
Your admin tool (I presume this to be a servlet or JSP) would add/remove/update the image in the CACHE only (as a byte[]). Not directly in the DB. The cache will make sure this is persisted to the DB if you have a JdbcCacheLoader configured.
A cache listener - registered with the cache - will be responsible for creating a file on the filesystem, with the name and byte[] in the cache.
The cache listener should do this whenever the cache is modified or created.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3966760#3966760
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3966760
19 years, 8 months