[JNDI and Naming] - Re: Failed to connect to server 10.0.1.170:1099
by Roland Thomas Lichti
Roland Thomas Lichti [http://community.jboss.org/people/klenkes] created the discussion
"Re: Failed to connect to server 10.0.1.170:1099"
To view the discussion, visit: http://community.jboss.org/message/564691#564691
--------------------------------------------------------------
> Peter Johnson schrieb:
>
> According to the telnet output, port 1199 is not open. Try entering the command "netstat -ab", look at the results to see what ports has open. Or, download and run tcpview from http://www.sysinternals.com/Utilities/TcpView.html http://www.sysinternals.com/Utilities/TcpView.html, it's easier to use and runs faster than netstat.
I have the problem, that the port is open:
klenkes@manitu:/opt/jbossesb-4.9/samples/quickstarts/helloworld$ netstat -tnlAktive Internetverbindungen (Nur Server)Proto Recv-Q Send-Q Local Address Foreign Address State
,,,tcp 0 0 10.1.2.133:1099 0.0.0.0:* LISTEN
...
But when trying to send a message the JNDI is not found:
runtest: [echo] Runs Test JMS Sender [java] Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: 10.1.2.133 and discovery failed with error: javax.naming.CommunicationException: Network is unreachable [Root exception is java.io.IOException: Network is unreachable] [Root exception is javax.naming.CommunicationException: Failed to connect to server /10.1.2.133:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is unreachable]]] [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1763) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:693) [java] at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:686) [java] at javax.naming.InitialContext.lookup(InitialContext.java:392) [java] at org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage.setupConnection(SendJMSMessage.java:53) [java] at org.jboss.soa.esb.samples.quickstart.helloworld.test.SendJMSMessage.main(SendJMSMessage.java:82) [java] Caused by: javax.naming.CommunicationException: Failed to connect to server /10.1.2.133:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is unreachable]] [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:335) [java] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1734) [java] ... 5 more [java] Caused by: javax.naming.ServiceUnavailableException: Failed to connect to server /10.1.2.133:1099 [Root exception is java.net.SocketException: Network is unreachable] [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:305) [java] ... 6 more [java] Caused by: java.net.SocketException: Network is unreachable [java] at java.net.PlainSocketImpl.socketConnect(Native Method) [java] at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333) [java] at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195) [java] at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182) [java] at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366) [java] at java.net.Socket.connect(Socket.java:529) [java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:97) [java] at org.jnp.interfaces.TimedSocketFactory.createSocket(TimedSocketFactory.java:82) [java] at org.jnp.interfaces.NamingContext.getServer(NamingContext.java:301) [java] ... 6 more
Thats the definition of the initial context (I changed the IP in the esb sample helloworld):
Properties properties1 = new Properties(); properties1.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); properties1.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces"); properties1.put(Context.PROVIDER_URL, "jnp://10.1.2.133:1099"); InitialContext iniCtx = new InitialContext(properties1);
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564691#564691]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Re: Concept of different locales/time zones in jBPM5
by Michael Wohlfart
Michael Wohlfart [http://community.jboss.org/people/mwohlf] created the discussion
"Re: Concept of different locales/time zones in jBPM5"
To view the discussion, visit: http://community.jboss.org/message/562524#562524
--------------------------------------------------------------
Hi Peter & HuiSheng,
I don't think the workflow engine should deal with things like timezones, DST or any kind of internationalization, that's not the job of the workflow engine. All dates and times the engine is dealing with should be UTC. Internationalization and localization, including calculating the local time for a specific user should happen in the user interface layer not in the core workflow engine.
The business calendar is a different story, right now there is a single business calendar per engine instance, and this doesn't cover all usecases. There might be users in different countries with different holidays. Having a business calendar per user seems to be a better approach but also a lot of overhead since most calendars are probably the same, but to me this seems to be the only change that is neccessary in jBPM4 to do localization.
Of course I might miss something, so please let me know if you think this wouldn't work...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/562524#562524]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[jBPM] - Transition rule EL Expression fails
by Donald Walters
Donald Walters [http://community.jboss.org/people/dondragon2] created the discussion
"Transition rule EL Expression fails"
To view the discussion, visit: http://community.jboss.org/message/563951#563951
--------------------------------------------------------------
I am using the default expression language to evaluate the rules for my transitions. But, I am getting the following exception each time it tries to process a rule in my decision node.
org.jbpm.api.JbpmException: expression condition ' #{response['resultSet'] != null && response['resultSet'][0][3] > 0}' did not return a boolean: true
at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:45)
at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62)
org.jbpm.api.JbpmException: expression condition ' #{response['resultSet'] != null && response['resultSet'][0][3] > 0}' did not return a boolean: true
at org.jbpm.pvm.internal.model.ExpressionCondition.evaluate(ExpressionCondition.java:45)
at org.jbpm.jpdl.internal.activity.DecisionConditionActivity.findTransitionUsingConditions(DecisionConditionActivity.java:62)
Why is result a string instead of a boolean?
How can I get around this?
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/563951#563951]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months
[JBoss Cache] - Lost update problem...
by Marco Dubacher
Marco Dubacher [http://community.jboss.org/people/dubacher] created the discussion
"Lost update problem..."
To view the discussion, visit: http://community.jboss.org/message/564660#564660
--------------------------------------------------------------
Hi there.
I have the problem that to threads want to create the new same node with the same key but different value at the same time. The value set by the threads depend on the value already set in the cache.
So each thread does the following.
1. Get the value for a fqn/key in the cache (i.e. returns the value 5)
2. Increment the value by a certain value (i.e. 5 + 3 = 8)
3. Put the value back in the cache (i.e. 8).
At the moment the JBossCache ist configured as follows:
Mode = local
Transaction = yes.
IsolationLevel = Repeatable_Read
Now if the node for the given fqn/key exists we are able to detect concurrent write conflicts by enabling "WriteSkewCheck". But initially for the given fqn/key no node does exist. If to threads happend to create this fqn/key at the same time we have the following scenario.
Thread 1: Start Transaction
Thread 1: Get the node with fqn/key. Null is returned.
Thread 1: Create a new node an puts it into the cache by calling cache.put(Fqn.fromString("mynode"), 1, 3) whereas 1 is the key and 3 the value.
Thread 2: Start Transaction
Thread 2: Get the node with fqn/key. Null is returned as we have transaction isolation...
Thread 2: Create a new node an puts it into the cache by calling cache.put(Fqn.fromString("mynode"), 1, 5). The thread has to wait because of write lock of thread 2.
Thread 1: Commit transaction
Thread 2: Receives lock (before running into TimeoutException) and writes the value 5 in the cache.
Thread 2: Commit transaction.
So now we have for the given fqn/key the value 5 in the cache, whereas the correct result should be 8 (= 3 + 5). So we have a lost update problem.
My question: How do you solve such a problem with JBossCache? I tried using Interceptors etc. but didn't succeed up to now...
I you need more information I am happy to give you more detailled explanations.
cheers,
marco
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/564660#564660]
Start a new discussion in JBoss Cache at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 2 months