[EJB 3.0] - EJB 3 Jboss 4.2 GA Issue
by abhilashjohn
Hi
Has any one faced this before?
Any pointers on the solution?
Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 127.1.
1.1:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java
.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connec
t to server 127.1.1.1:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server 127.
1.1.1:1099 [Root exception is java.net.ConnectException: Connection refused: connect]]]
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627)
at javax.naming.InitialContext.lookup(Unknown Source)
at com.ejb.client.Client.main(Client.java:16)
Caused by: javax.naming.CommunicationException: Failed to connect to server 127.1.1.1:1099 [Root exception is javax.nami
ng.ServiceUnavailableException: Failed to connect to server 127.1.1.1:1099 [Root exception is java.net.ConnectException:
Connection refused: connect]]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:274)
at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1533)
... 4 more
Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server 127.1.1.1:1099 [Root exception is java.
net.ConnectException: Connection refused: connect]
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:248)
... 5 more
Caused by: java.net.ConnectException: Connection refused: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at java.net.Socket.(Unknown Source)
at java.net.Socket.(Unknown Source)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:84)
at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:77)
at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:244)
... 5 more
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221384#4221384
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221384
17 years
[Javassist user questions] - Adding member value with no name to annotation
by alexandrem
Hi,
This is what I'm trying to achieve:
| ...
| @Entity
| @IdClass(MyPKClass.class)
| public class MyClass {
| ...
| }
|
This is a fully javassist generated class, I am able to annotate with the @Entity, even add member values in form name=value... but how shall I proceed to add the member value to @IdClass?
Tried this so far (with mv = new ClassMemberValue(MyPKClass.class.getName(), cp);):
- annotation.addMemberValue( "", mv );
- annotation.addMemberValue( null, mv );
- annotation.addMemberValue( -1, mv );
- annotation.addMemberValue( 0, mv );
Even tried to add annotation with param itself, wich didn't worked obviously:
new Annotation("javax.persistence.IdClass(MyPKClass.class)", cp);
Obviously I'm on the desperate side, trying desperate solutions... Any help ?
Thanks & BR
Alexandre Mendonca
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221383#4221383
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221383
17 years
[JBoss Cache: Core Edition] - invalidation messages lost/ignored?
by dukehoops
I have 2-node cluster running on the same host using MVCC and INVALIDATION_ASYNC (JGroups udp) with Hibernate 3.3.1. Under load an Entity update in ClusterNodeA does sometimes does not cause invalidation of same Entity in ClusterNodeB:
State in B's Cache (and in DB) after B updates UserSession:
| /com.doppelganger.domain.UserSession#1116 {item={hibernateVersion=40, boot=false, loginTime=2009-03-26 09:05:48.0, icecastMount=null, _subclass=com.doppelganger.domain.UserSession, macAddressMD5=null, serverSession=null, enclosingSpace=null, userStates=0, creationDate=2009-03-26 09:05:48.0, deviceIdMD5=null, _version=40, expirationTime=2009-03-26 10:06:55.0, token=108fb802-d5ca-40eb-80bb-c347efa95b64, logoutTime=null, _lazyPropertiesUnfetched=false, user=172}}
|
State in A's Cache at the same time:
| /com.doppelganger.domain.UserSession#1116 {item={hibernateVersion=39, boot=false, loginTime=2009-03-26 09:05:48.0, icecastMount=null, _subclass=com.doppelganger.domain.UserSession, macAddressMD5=null, serverSession=272, enclosingSpace=205, userStates=0, creationDate=2009-03-26 09:05:48.0, deviceIdMD5=null, _version=39, expirationTime=2009-03-26 10:06:55.0, token=108fb802-d5ca-40eb-80bb-c347efa95b64, logoutTime=null, _lazyPropertiesUnfetched=true, user=172}}
|
The correct state is hibernateVersion=40; serverSession=NULL (not the case in A).
Subsequent attempts to update this UserSession on A lead to StaleObjectStateException because hibernateVersion is < 40.
Question:
Seems like the invalidation message from B (a) either never arrives at A or (b) is ignored by A for some reason. Any hints on which loggers to turn up and for which messages to look to determine whether it's (a) or (b)?
Possible workaround/solution?
Let's say lost invalidation messages are a possibility and the app just has to be able to deal with it. Our app has a TX retry mechanism that retries StaleObjectStateException (and other concurrent access-related exceptions). Seems like it'd be more reliable to removeNode for Entity causing the exception before executing a retry. However, this removal should be done locally only (and not be multicast to other nodes).
I see org.jboss.cache.config.Option.cacheModeLocal and org.hibernate.cache.jbc2.util.CacheHelper.remove(Cache cache, Fqn region, Object key, Option option). Unfortunately, there is no way to pass on Option to org.hibernate.cache.jbc2.entity.TransactionAccess.remove(key). So it seems like the thing to do is to call CacheHelper.removeNode(stuff, Option.cacheModeLocal=true) before TX retry (would execute outside of tx). What do folks think?
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221377#4221377
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221377
17 years
[JBoss jBPM] - Get Action from Timer. Earlies execution time
by jjrs
Hello,
In my process definition we have several nodes (containing actions), that have to have an "earliest start time" associated to them. The best way I found for implementing this functionality was creating a State node, create a timer inside it , and associate the action to the timer. Something like the example below:
<state name="LoadConvertedCont1" async="true">
| <timer duedate='#{executionStartTime + 1 Hour}' >
| <action class="com.xxxxx.jbpm.actions.Adaptor" async="true" name="loadConvertedContributions">
| <taskBeanId>
| loadConvertedContributions
| </taskBeanId>
| <maxDurationMinutes>
| 60
| </maxDurationMinutes>
| </action>
| </timer>
| <transition to="LoadConvertedCon2"></transition>
| </state>
Everything is fine, until I try to stop the execution of the action. I have my own implementation of the JobExecutorThread. I extended the API for being to interrupt the execution of an the action. If the action was inside a node of type node, the code for accessing it, is quite easy :
Action action = job.getToken().getNode().getAction();
But when the action is inside a timer and the timer is inside a Node of type State, I don't see an easy way of retrieving the action object, and the only possible way that I have found is using the HibernateProxy provided by Hibernate, although I don't consider this is the best option
Timer timer = (Timer)((HibernateProxy)job).getHibernateLazyInitializer().getImplementation();
| Action action = timer.getAction();
Is there any way, using the JBPM API for retrieving the action being executed from the JobExecutorThread ?
job.getToken().getNode().getName();
| //is providing me the correct name of the Node (even if it is if type State)
|
| runningJob.getToken().getNode().getAction();
| //is null when the action is inside the timer, and the timer inside the State Node.
Regards.
Jose.
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221371#4221371
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221371
17 years