[JNDI and Naming] - InitialContext#lookup does not timeout
by Stian Thorgersen
Stian Thorgersen [http://community.jboss.org/people/stianst] created the discussion
"InitialContext#lookup does not timeout"
To view the discussion, visit: http://community.jboss.org/message/600583#600583
--------------------------------------------------------------
I've got an issue where InitialContext#lookup will hang forever doing a lookup if there is a problem with the network. I appreciate this is the default settings of the TCP sockets to wait forever, so I've tried to configure the timeout using 'jnp.timeout' and 'jnp.sotimeout', but it still waits forever.
Hashtable<String, String> env = new Hashtable<String, String>();
env.put("java.naming.factory.initial", "org.jnp.interfaces.NamingContextFactory");
env.put("java.naming.provider.url", "jnp://10.9.1.11:1099");
env.put("java.naming.factory.url.pkgs", "org.jboss.naming");
env.put("jnp.socketFactor", "org.jnp.interfaces.TimedSocketFactory");
env.put("jnp.timeout", "1000");
env.put("jnp.sotimeout", "1000");
InitialContext ctx = new InitialContext(env);
HelloWorld world = (HelloWorld) ctx.lookup("HelloWorldBean/remote");
world.sayHello("hello");
// disconnect network here
world = (HelloWorld) ctx.lookup("HelloWorldBean/remote");
world.sayHello("hello");
In the above example if the network is disconnected before the first lookup it times out as expected, but if the network is disconnected between the first and the second lookup it doesn't timeout at all (waited 10 min+).
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/600583#600583]
Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM] - Problem with starting process
by Lukasz Kozerski
Lukasz Kozerski [http://community.jboss.org/people/lukasz.kozerski] created the discussion
"Problem with starting process"
To view the discussion, visit: http://community.jboss.org/message/622346#622346
--------------------------------------------------------------
Hi,
I have some problem with startring the process. Unfortunetly it is related to process persistence.
I have some breakpoints, here:
org.jbpm.process.instance.impl.ProcessInstanceImpl.start()
and here:
org.jbpm.persistence.processinstance.ProcessInstanceInfo.update()
When I'm starting process:
ProcessInstance process = ksession.startProcess("process", parameters);
ksession.insert(object);
ksession.insert(process);
ksession.fireAllRules();
ksession.dispose();
everything seems to be ok. Breakpoints fires in correct order: start() and then update().
But I need to start the process like this:
ProcessInstance process = ksession.createProcessInstance("process", parameters);
long processId = process.getId();
ksession.startProcessInstance(processId);
ksession.insert(object);
ksession.insert(process);
ksession.fireAllRules();
ksession.dispose();
In this example breakpoints fires in this order: update(), start().
Why this is problem?
If the server restarts and ProcessInstance is deserialized it has state STATE_PENDING. If now we complete some work item there is one line of code here:
org.jbpm.workflow.instance.impl.WorkflowProcessInstanceImpl.signalEvent(String, Object)
I looks like this:
if (getState() != ProcessInstance.STATE_ACTIVE) {
return;
}
and process is not continuing.
What am I doing wrong?
Lukasz
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/622346#622346]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months
[jBPM] - problem with jbpm on weblogic
by arash norouz
arash norouz [http://community.jboss.org/people/arashbahal] created the discussion
"problem with jbpm on weblogic"
To view the discussion, visit: http://community.jboss.org/message/569094#569094
--------------------------------------------------------------
hi all
i am new to jbpm.
i am trying to implement some web services based on jbpm. i have implemented my services and test it in stand alone mode and it is ok!
but when i am trying to deploy my services on weblogic server it is thrown by some exceptions!
*org.hibernate.HibernateException: Errors in named queries: findTasks, findMessages, findTimers, findGroupsByUserAndGroupType, findProcessInstanceIds, findJo
at org.hibernate.impl.SessionFactoryImpl.<init>(SessionFactoryImpl.java:397)
at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1327)
at org.jbpm.pvm.internal.wire.descriptor.HibernateSessionFactoryDescriptor.construct(HibernateSessionFactoryDescriptor.java:62)
at org.jbpm.pvm.internal.wire.WireContext.construct(WireContext.java:487)
at org.jbpm.pvm.internal.wire.WireContext.create(WireContext.java:466)
Truncated. see log file for complete stacktrace*
after searching the internet i have found that adding
*<property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>*
to hibernate config fix the problem. i have tried the solution and it was successful, but after deploying
when i want to run one of my services it throws another exception
my code snippet is:
*ProcessInstance processInstance = executionService
.startProcessInstanceByKey(processDefinitionId, parameters,
userId + "-" + sequence);*
and the exception is :
*Error invoking com.pardis.notification.core.Services (POJO): org.hibernate.QueryException<ComponentHandler.handleRequest:144>
<WSEE:21>org.hibernate.QueryException: Incorrect query syntax [select new map( idProperty.objectName as objectName, idProperty.deployment.dbid as deploymentDbid )*
*
*
*Caused by: java.lang.NullPointerException
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.hibernate.util.ReflectHelper.classForName(ReflectHelper.java:123)
at org.hibernate.hql.classic.SelectParser.token(SelectParser.java:96)
at org.hibernate.hql.classic.ClauseParser.token(ClauseParser.java:109)
at org.hibernate.hql.classic.ClauseParser.end(ClauseParser.java:136)
at org.hibernate.hql.classic.PreprocessingParser.end(PreprocessingParser.java:145)
at org.hibernate.hql.classic.ParserHelper.parse(ParserHelper.java:52)
at org.hibernate.hql.classic.QueryTranslatorImpl.compile(QueryTranslatorImpl.java:239)*
please help me about this situation
thanks in advance
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/569094#569094]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
12 years, 10 months