[rules-users] Flow Timer causes exception: Caused by: java.util.concurrent.RejectedExecutionException

2010-09-18 Thread Gustavo Tenrreiro
Hi,

I have a flow and a set of rules.
In the flow I have a wait state. If the wait state has a timer, when
the flow reaches the node it blows up with the following exception (
See Below ), if I remove the timer everything works.

INFO  2010-09-18 16:26:28 [ERROR]
com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager
Could not commit session
java.lang.RuntimeException: Could not commit session
at 
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:292)
at 
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.execute(CommandBasedStatefulKnowledgeSession.java:434)
at 
com.kgcontrols.services.raytheon.standardsRequests.workflow.managers.DroolsEventsManager.sendEvent(DroolsEventsManager.java:43)
at 
com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0.defaultConsequence(Rule_domainLeadReject_0.java:10)
at 
com.kgcontrols.services.raytheon.standardsRequests.workflow.Rule_domainLeadReject_0DefaultConsequenceInvoker.evaluate(Rule_domainLeadReject_0DefaultConsequenceInvoker.java:34)
at 
org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:917)
at org.drools.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:856)
at org.drools.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1071)
at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:785)
at 
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:751)
at 
org.drools.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:218)
at 
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:99)
at 
org.drools.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:33)
at 
org.drools.persistence.session.SingleSessionCommandService.execute(SingleSessionCommandService.java:279)
at 
org.drools.command.impl.CommandBasedStatefulKnowledgeSession.fireAllRules(CommandBasedStatefulKnowledgeSession.java:201)
at 
com.kgcontrols.services.raytheon.standardsRequests.workflow.listeners.VoteCreatedEventListener.onMessage(VoteCreatedEventListener.java:78)
at 
org.apache.activemq.ActiveMQMessageConsumer.dispatch(ActiveMQMessageConsumer.java:854)
at 
org.apache.activemq.ActiveMQSessionExecutor.dispatch(ActiveMQSessionExecutor.java:99)
at 
org.apache.activemq.ActiveMQSessionExecutor.iterate(ActiveMQSessionExecutor.java:166)
at 
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:117)
at 
org.apache.activemq.thread.PooledTaskRunner.access$100(PooledTaskRunner.java:26)
at 
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:44)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at 
edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.util.concurrent.RejectedExecutionException
at 
java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1768)
at 
java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:767)
at 
java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:216)
at 
java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:379)
at 
org.drools.time.impl.JDKTimerService.schedule(JDKTimerService.java:102)
at 
org.drools.time.impl.JDKTimerService.scheduleJob(JDKTimerService.java:80)
at 
org.drools.process.instance.timer.TimerManager.registerTimer(TimerManager.java:60)
at 
org.drools.workflow.instance.node.StateBasedNodeInstance.internalTrigger(StateBasedNodeInstance.java:56)
at 
org.drools.workflow.instance.node.CompositeNodeInstance.internalTrigger(CompositeNodeInstance.java:86)
at 
org.drools.workflow.instance.node.StateNodeInstance.internalTrigger(StateNodeInstance.java:48)
at 
org.drools.workflow.instance.impl.NodeInstanceImpl.trigger(NodeInstanceImpl.java:117)
at 
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerConnection(NodeInstanceImpl.java:178)
at 
org.drools.workflow.instance.impl.NodeInstanceImpl.triggerCompleted(NodeInstanceImpl.java:144)
at 
org.drools.workflow.instance.impl.ExtendedNodeInstanceImpl.triggerCompleted(ExtendedNodeInstanceImpl.java:53)
at 
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:117)
at 
org.drools.workflow.instance.node.StateBasedNodeInstance.triggerCompleted(StateBasedNodeInstance.java:98)
at 
org.drools.workflow.instance.node.WorkItemNodeInstance.triggerCompleted

Re: [rules-users] Looking for a place to start with drools

2010-09-16 Thread Gustavo Tenrreiro
Hi Dean,

I ve only been working with Drools for about a couple of months.
My first impression was that it was a great tool and very
straightforward. But as I got deeper into it, I found a lot of
gotchas, and things I didn't quite understand how they worked ( for
many I still don't ). Finding definitive answers to those questions
has been hard. Even though this forum, as well as the IRC chat are
very helpful, the flow of information is somewhat limited.
If what you are doing has some complexity beyond the simple examples
provided by the documentation, and sample code, then you will probably
get stuck at some point, and burn a lot of time trying to figure out
the problem.

So if you are on a tight budget that requires tight deadlines using
Drools to replace your existing code would be a high risk proposition
I believe.

On the other hand, the Drools's potential to simplify, and streamline
my system is great. if I manage to get it to do what I want it to do
it would be a huge win for my organization, and the Drools system
would be mostly responsible for that.

So to summarise, jumping into the Drools bandwagon would be an
"educated bet", but a bet nonetheless.

Hope that helps.

Thanks


2010/9/16 Dean Whisnant :
> I am investigating using Drools for our company’s EDI processing.  The
> nature of our software system is that each of our clients (dozens) has a
> full distribution of our base software and in the past we would make custom
> changes to that base software at each of their sites based upon their
> trading partners and business needs. For the most part these changes
> involved nothing more than if-then statements for rather simple logic, but
> that would become complicated at certain customers where there were large
> numbers of trading partners and specific customer needs.  In general we saw
> 2,000 lines of code swell to 4-6,000 lines of code.
>
>
>
> We are in the process of rewriting this portion of our code and are
> entertaining using drools to allow us to 1) create a standard ruleset, 2)
> create a ruleset specific to a trading partner (many customers share some
> common trading partners), and 3) create a customer business ruleset that
> they can maintain through some GUI tool (Guvnor).
>
>
>
> So far, I’ve created a sample java program that has classes representing
> some of our data files (UniData environment using uniobjects) and have been
> working with a single .drl file to test out general rules.  I appear to be
> able to write just about any rule I’ve needed in the past with no issues,
> including rules that spawn processes within my native software.
>
>
>
> These are my questions:
>
>
>
> 1.   How would you package these types of rules?  I have three
> categories as stated above and it seems logical that I would package them in
> that manner.  However within each group there are logical groupings of
> rules.  In the customer rules I may have a couple dozen on how to populate a
> field that deals with adding comments and another couple dozen having to
> deal with setting certain fields with specific codes that are based upon
> incoming data.  Two quite different logical areas within our software.
>
> 2.   How would you deal with the GUI? Is Guvnor truly something I can
> setup in a way that my end users can manipulate without “damaging” the
> custom ruelset?
>
> 3.   Within Guvnor, how would you handle the possibility of there being
> over 2,000 fields to choose from to form a rule?
>
> 4.   What is the performance hit if we were to make each customer rule
> part of once decision table or another? Would you even consider this as an
> option?
>
>
>
> Thank you!
>
>
>
> --Dean
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] On Entry On Exit actions question

2010-09-15 Thread Gustavo Tenrreiro
Hi,

When using an "Email" node for example, where On Entry, and On Exit
actions are available. If I create an object within the On Entry
action ( Let's say a list of recipients for the email ), how do I
access that data from the body of the email ? What is the best
strategy to access data that was created on the On Entry action, from
the node itself ?

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] How to remove a persisted session from the database ?

2010-09-15 Thread Gustavo Tenrreiro
Yeah thanks ! I had figured it out, but how do you get your
"transactional context" ?

I ended up doing the following, in case someone else needs to do the same:

within a class...

public void deleteSession(StatefulKnowledgeSession session)
{
initTransactionManager();
this.txm.begin();

registerRollbackSync();

SessionInfo info =
jpm.getApplicationScopedEntityManager().find(org.drools.persistence.session.SessionInfo.class,
new Integer(session.getId()));
System.out.println("This is the sessionInfo: " + info);
jpm.getApplicationScopedEntityManager().remove(info);
jpm.getApplicationScopedEntityManager().flush();

this.txm.commit();
}

private void initTransactionManager() {
Object tm = environment.get( 
EnvironmentName.TRANSACTION_MANAGER );
this.txm = new JtaTransactionManager( environment.get(
EnvironmentName.TRANSACTION ),
environment.get( 
EnvironmentName.TRANSACTION_SYNCHRONIZATION_REGISTRY ),
tm );
this.jpm = new DefaultJpaManager(this.environment);

}


private static class SynchronizationImpl
implements
TransactionSynchronization {

JPAKnowledgeSessionLookup service = getInstance();
public SynchronizationImpl(JPAKnowledgeSessionLookup service) {
this.service = service;
}

public void afterCompletion(int status) {
if ( status != TransactionManager.STATUS_COMMITTED ) {
this.service.rollback();
}


this.service.jpm.endCommandScopedEntityManager();

}

public void beforeCompletion() {

}

}

Thanks

On Wed, Sep 15, 2010 at 1:33 PM, drooRam  wrote:
>
> I have done something like below to remove the persisted session :
>
>                SessionInfo si = em.find(SessionInfo.class, sessionId);
>                em.remove(si);
>
> call the above lines in a transactional context. its done.
> --
> View this message in context: 
> http://drools-java-rules-engine.46999.n3.nabble.com/How-to-remove-a-persisted-session-from-the-database-tp1473926p1481588.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How to remove a persisted session from the database ?

2010-09-14 Thread Gustavo Tenrreiro
Hi,

I am using persistence, and since the sessions don't seem to have a
standard way of getting removed from the database when they are not
needed anymore, I am wondering how to do that.
I am using JPA but if I call :

em.remove(someSessionInfo);

where em is the JPA EntityManager, that does not remove the entry from
the database.

if I try to use a Query returned by the em.createQuery("delete from
SessionInfo where id = 1") it complains that it needs a transaction,
and since I don't know how to get around the issue I am stuck.

Any help would be appreciated.

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Invalid StatefulKnowledgeSession id returned

2010-09-13 Thread Gustavo Tenrreiro
Hi,

I am having an issue where after creating a new
StatefulKnowledgeSession using JPA for persistence, the id returned by
the getId() method on the session returns 0, even though I can see the
session id in the database is not 0 but some other integer.

There are no exceptions thrown.

Does anyone know why this is?

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] How do sessions get removed from the database ?

2010-09-13 Thread Gustavo Tenrreiro
Hi,

I am using StatefulKnowledgeSession and JPA for persistence.

I create a session for each Drools Flow process I start, so there is a
1 to 1 mapping between the session and the process.
When the process ends, I can see the process gets removed from the database.

How can the session be removed from the database as well ?
Do I need to do that manually ?

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Drools list test

2010-09-13 Thread Gustavo Tenrreiro
HI,

This is a test email.
My emails to the list don't seem to be getting there.
If anyone gets this, can you please let me know if you got it.

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Keeping track of sessions and their process instances

2010-09-08 Thread Gustavo Tenrreiro
Hi,

I am working on a flow that uses flow events.
I send the event from a rule, and the only way I know to send an event
requires that I know the processId as well as the sessionId. Which
means I need to be able to keep track of both those two values so that
I can later use them to send the event.

So the question is what is the best strategy to keep track of the
sessions and the processes ?
The following is what I do; please comment on it, and feel free to
suggest a better way.

I ve created a class called WorkflowInfo that has two members (
processId, and sessionId )
When I start the process I create a WorkflowInfo, I set the processId,
and the sessionId then I insert it into the working memory:

 WorkflowInfo info = new WorkflowInfo();
 info.setProcessId(instance.getId());
 info.setSessionId(ksession.getId());
 ksession.insert(info);

In one of the rules I check for a condition, and when it is met I send
the flow event:


rule "sendEvent"
when
   $info : WorkflowInfo()
   
then
  DroolsEventsManager.getInstance().sendEvent($info.getProcessId(),
$info.getSessionId(), "someEvent");
end



Now to send the event this is what I do ( from a java class ):

public void sendEvent(long processId, int sessionId, String eventType)
{

StatefulKnowledgeSession session =
JPAKnowledgeSessionLookup.getInstance().loadSession(sessionId);

try {

SignalEventCommand command = new SignalEventCommand();
command.setProcessInstanceId(processId);
command.setEventType(eventType);
command.setEvent(true);
session.execute(command);
} catch (Exception e) {
Logger.getInstance().error(this.getClass(), 
e.getMessage());
e.printStackTrace();
}
finally{
session.dispose();
}

}


Does this approach make sense ?

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Drools Flow - Session objects

2010-09-03 Thread Gustavo Tenrreiro
I don't totatlly understand the process / session lifecycle, and how
the rules and the flow are related to one another in time. But I
wanted to see if the following would work.
See what happens if you create a flow that has the Start + your
RuleFlow node + a Timer + End
Set the timer to 6 or something like that.

Then see if it works.

Thanks

On Fri, Sep 3, 2010 at 10:18 AM, jawa  wrote:
>
> Thanks for your answer I've tried that but no luck. It just runs
> NotDisplaycomments rule.
>
> Any more ideas?
>
> Thanks
>
> PS: I am starting my flow from an EJB (local) if that helps.
> --
> View this message in context: 
> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Session-objects-tp1400891p1412750.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Persistence.createEntityManagerFactory NullPointerException

2010-09-03 Thread Gustavo Tenrreiro
If it helps at all; I spent almost a full week trying to get JPA  to
work with Tomcat 5.5 + Hibernate + Bitronix and this is what I found.

The instructions for Bitronix in
http://docs.codehaus.org/display/BTM/Tomcat13 did not help me much.
The datasource that gets created via the resource.properties could
never be found.

- So to get it to work, do deploy the Bitronix jar files into your
server / context

- In the Tomcat conf/context.xml I do have "" but I
am not sure if it is required ( haven't tested removing it ).

- In the web.xml I do have:

  

java:comp/env/jdbc/processInstanceDS
javax.sql.DataSource
  

where jdbc/processInstanceDS is your jdbc/mysql

- In the Hibernate persistence.xml I do have:

  
  

although I don't think it is using the jndi.class specified there, so
the second line might be redundant.

Then in my code I create the datasource by hand ( in a ServletContextListener ):

PoolingDataSource ds = new PoolingDataSource();
ds.setUniqueName( "jdbc/processInstanceDS" );
ds.setClassName( 
"bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
ds.setMaxPoolSize( 3 );
ds.setAllowLocalTransactions( true );

ds.getDriverProperties().put("driverClassName","com.microsoft.sqlserver.jdbc.SQLServerDriver");
ds.getDriverProperties().put( "user", "xxx" );
ds.getDriverProperties().put( "password", "" );
ds.getDriverProperties().put( "url", 
"mySqlServerUrl..." );

replace the driverClassName, user, password, and url for your setup. I
am using SQLServer, but I guess you are on MySql.

After that the JPA stuff works, and persistence works as advertised.
This is the only setup that worked for me. I tried creating the
datasource from Spring but that didn't work either.

Please let me know what you find out.

Thanks


2010/9/3 Pablo Nussembaum :
> You need to configure bitronix[0] to provide JTA. Or use drools-spring that
> allows you to use drools-persisntece-jpa without JTA.
>
> [0] http://docs.codehaus.org/display/BTM/Tomcat13
> On 09/03/2010 08:53 AM, liang wrote:
>
> i found that tomcat 6 have not JTA,which server is able to persistence?
>
> 在 2010年9月3日 下午12:02,liang 写道:
>>
>> THS,Esteban,I found it which is resin's problem, so i replaced it to
>> tomcat6, i got other questions:
>>
>>  in my webapp webroot/meta-inf/content.xml:
>> 
>> 
>>   >maxActive="10" maxIdle="2" maxWait="1"
>> logAbandoned="true"
>>username="root" password="11"
>> driverClassName="com.mysql.jdbc.Driver"
>>url="jdbc:mysql://localhost:3306/test"/>
>> 
>>
>> webroot/web-inf/web.xml:
>>
>>  
>>   DB Connection
>>   jdbc/mysql
>>   javax.sql.DataSource
>>   Container
>> 
>>
>> webroot/meta-inf/persistence.xml:
>>
>> 
>> > version="1.0"
>> xsi:schemaLocation=
>> "http://java.sun.com/xml/ns/persistence
>>  http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
>>  http://java.sun.com/xml/ns/persistence/orm
>>  http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
>> xmlns:orm="http://java.sun.com/xml/ns/persistence/orm";
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> xmlns="http://java.sun.com/xml/ns/persistence";>
>>
>>  
>>
>> > transaction-type="JTA">
>> org.hibernate.ejb.HibernatePersistence
>> java:comp/env/jdbc/mysql
>> org.drools.persistence.session.SessionInfo
>>  org.drools.persistence.processinstance.ProcessInstanceInfo
>>
>> org.drools.persistence.processinstance.ProcessInstanceEventInfo
>> org.drools.persistence.processinstance.WorkItemInfo
>>
>>
>> 
>> > value="org.hibernate.dialect.MySQLDialect"/>
>> 
>> 
>> 
>> > value="org.hibernate.transaction.BTMTransactionManagerLookup" />
>> 
>> 
>>
>> 
>>
>> webroot/testJNDI.jsp:
>>
>> <%@ page import='java.sql.*, javax.sql.*, javax.naming.*' %>
>> <%
>> Context ic = new InitialContext();
>> DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/mysql");
>>
>> Connection conn = ds.getConnection();
>>
>> try {
>>   Statement stmt = conn.createStatement();
>>   ResultSet rs = stmt.executeQuery("select * from test");
>>   while (rs.next()) { %>
>> <%= rs.getString(1) %> <%= rs.getString(2) %><%
>>   }
>> } finally {
>>   conn.close();
>> }
>> %>
>>
>> webroot/testDroolsFlow.jsp:
>>
>> <%@ page import='java.sql.*, javax.sql.*, javax.naming.*,com.abc.*' %>
>> <%
>> VdcService.exec();
>> %>
>>
>> run the testJNDI.jsp,its OK.when i run testDroolsFlow.jsp, appears this
>> exception:
>>
>> java.lang.RuntimeException: Could not commit session
>> at
>> org.drools.persistence.session.SingleSessionCommandService.(SingleSessionCommandService.java:119)
>> at
>> org.drools.persistence.jpa.impl.JP

Re: [rules-users] Drools Flow - Session objects

2010-09-02 Thread Gustavo Tenrreiro
It looks to me like it should work, as you point out.

Thanks

On Wed, Sep 1, 2010 at 10:12 AM, jawa  wrote:
>
> Hi,
>
> I am writing a small drools flow app. My flow starts off with a RuleGroup
> node then I've two User Task nodes. What i do is this:
>
> StatefulKnowledgeSession session =
> JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null,
> environment);
> WorkItemManager manager = session.getWorkItemManager();
> manager.registerWorkItemHandler("Human Task", new MyWorkItemHandler(false));
> MyVO vo = new MyVO();
> vo.setComment("These are comments !!");
> session.insert(vo);
> ProcessInstance processInstance = session.startProcess("pocflow", null);
> session.fireAllRules();
> session.dispose();
>
> As you can see i am inserting an object of type MyVO into the knowledge base
> session. I am using JPA to store my flow in db. Now when I execute this
> code, it starts my flow then calls my drl file for RuleGroup node then calls
> human tasks etc. In my drl file I've this code:
>
> package mypackage
> import net.plus.kbd.poc.MyVO;
>
> rule "Displaycomments"
> ruleflow-group "display_comments"
>        when $vo: MyVO()
>        then
>                System.out.println("Inside Rule->MyVoComments->" + 
> $vo.getComment());
> end
> rule "NotDisplaycomments"
> ruleflow-group "display_comments"
>        when not $v: MyVO()
>        then
>                System.out.println("Inside Rule->MyVoComments not found");
> end
>
> So when this rule gets executed it always run "NotDisplaycomments" rule and
> prints out that MyVoComments not found. As far as I know it should find my
> vo which i inserted into the session. isn't it?
>
> I am using drools 5.1.1 on jboss 5.
>
> Any idea what am I doing wrong?
>
> Thanks
>
> --
> View this message in context: 
> http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Flow-Session-objects-tp1400891p1400891.html
> Sent from the Drools - User mailing list archive at Nabble.com.
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>

___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] java.lang.RuntimeException: Unable to load session snapshot

2010-09-01 Thread Gustavo Tenrreiro
Hi,

I am using JPA session persistance. Everything is working fine, then a
rule fires that detects an Event, and after that trying to recreate
the session fails with a:

Caused by: java.lang.RuntimeException: Unable to load session snapshot
at 
org.drools.persistence.session.JPASessionMarshallingHelper.loadSnapshot(JPASessionMarshallingHelper.java:96)

Can anyone help me with this ?

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Does anyone have a working Hibernate + Bitronix + Tomcat configuration

2010-08-27 Thread Gustavo Tenrreiro
Hi,

Does anyone have a working Hibernate + Bitronix + Tomcat configuration
which works with Drools process persistence ?

If so can you share it?

In my case Hibernate just does not find the Datasource, no matter what I do.

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Hibernate + Bitronix + Tomcat working configuration

2010-08-27 Thread Gustavo Tenrreiro
Hi,

Does anyone have a working Hibernate + Bitronix + Tomcat configuration
which works with Drools process persistence ?

If so can you share it?

In my case Hibernate just does not find the Datasource, no matter what I do.

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


Re: [rules-users] Is transaction management required for Drools process / session persistence

2010-08-27 Thread Gustavo Tenrreiro
Hi Greg,

I am attaching:

persistence.xml
hibernate_processInstanceDS.cfg.xml
META-INF/context.xml
conf/context.xml
resources.properties
btm-config.properties


and

I have this in the web.xml

 
jdbc/processInstanceDS
javax.sql.DataSource
  

I appreciate your help

Thanks

On Fri, Aug 27, 2010 at 9:52 AM, Chrystall, Greg  wrote:
> Yes you do need transaction management.
>
> How is your datasource configured in hibernate?
>
> Are you using jndi?
>
> This may help:
>
> http://docs.codehaus.org/display/BTM/Jndi13
>
> The bit you want is this:
>
> You just have to create a jndi.properties file in your classpath with this 
> content:
>
> java.naming.factory.initial=bitronix.tm.jndi.BitronixInitialContextFactory
>
> -Original Message-
> From: rules-users-boun...@lists.jboss.org 
> [mailto:rules-users-boun...@lists.jboss.org] On Behalf Of Gustavo Tenrreiro
> Sent: 27 August 2010 15:36
> To: rules-users@lists.jboss.org
> Subject: [rules-users] Is transaction management required for Drools process 
> / session persistence
>
> Hi,
>
> I am trying to do Drools persistence in Tomcat with Hibernate, but it
> would seem it also requires transaction management. Is that true?
>
> In the meantime I tried to setup Bittronix to provide the transaction
> management, but I can't get Hibernate to find the datasource at all.
>
> I ve followed the BTM integration instructions for Tomcat, I ve also
> done followed the BTM integration instructions for Hibernate, but
> still nothing, Hibernate keeps saying it can't find the datasource.
>
> Can anyone shed some light on this ?
>
> BTW: my database is SQL Server
>
> Thanks
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>
>
> **
> This message is confidential and intended only for the addressee. If you have 
> received this message in error, please immediately notify the 
> postmas...@nds.com and delete it from your system as well as any copies. The 
> content of e-mails as well as traffic data may be monitored by NDS for 
> employment and security purposes. To protect the environment please do not 
> print this e-mail unless necessary.
>
> NDS Limited. Registered Office: One London Road, Staines, Middlesex, TW18 
> 4EX, United Kingdom. A company registered in England and Wales. Registered 
> no. 3080780. VAT no. GB 603 8808 40-00
> **
>
> ___
> rules-users mailing list
> rules-users@lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>


btm-config.properties
Description: Binary data




WEB-INF/web.xml
	





resources.properties
Description: Binary data






http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd";>




jdbc/processInstanceDS2
after_statement
jta
org.hibernate.transaction.JTATransactionFactory
org.hibernate.transaction.BTMTransactionManagerLookup

org.hibernate.dialect.SQLServerDialect
org.hibernate.cache.NoCacheProvider
true






http://java.sun.com/xml/ns/persistence
   http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
   http://java.sun.com/xml/ns/persistence/orm
   http://java.sun.com/xml/ns/persistence/orm_1_0.xsd";
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns="http://java.sun.com/xml/ns/persistence";>
	
  
org.hibernate.ejb.HibernatePersistence
	jdbc/processInstanceDS2
org.drools.task.Attachment
org.drools.task.Content
org.drools.task.BooleanExpression
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Comment
org.drools.task.Deadline
org.drools.task.Delegation
org.drools.task.Escalation
org.drools.task.Group
org.drools.task.I18NText
org.drools.task.Notification
org.drools.task.EmailNotification
org.drools.task.EmailNotificationHeader
org.drools.task.PeopleAssignments
org.drools.task.Reassignment
org.drools.task.Status
org.drools.task.Task
org.drools.task.TaskData
org.drools.task.SubTasksStrategy
org.drools.task.OnParentAbortAllSubTasksEndStrategy
org.drools.task.OnAllSubTasksEndParentEndStrategy
org.drools.task.User

		org.drools.persistence.session.SessionInfo
		org.drools.persistence.processinstance.ProcessInstanceInfo
		org.drools.persistence.processinstance.ProcessInstanceEventInfo
		org.drools.persistence.processinstance.

[rules-users] Is transaction management required for Drools process / session persistence

2010-08-27 Thread Gustavo Tenrreiro
Hi,

I am trying to do Drools persistence in Tomcat with Hibernate, but it
would seem it also requires transaction management. Is that true?

In the meantime I tried to setup Bittronix to provide the transaction
management, but I can't get Hibernate to find the datasource at all.

I ve followed the BTM integration instructions for Tomcat, I ve also
done followed the BTM integration instructions for Hibernate, but
still nothing, Hibernate keeps saying it can't find the datasource.

Can anyone shed some light on this ?

BTW: my database is SQL Server

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users


[rules-users] Where is MinaTaskClient ?

2010-08-15 Thread Gustavo Tenrreiro
Hi,

I am trying to connect to the mina server using the MinaTaskClient
referred in the documentation; however the class does not seem to
exist.
I got the latest Drools 5.1 download.

In any case how can I connect to the server in order to retrieve the tasks ?

I see the TaskClient has the methods I need, but I am not sure how to
create one, and everything I ve tried fails to retrieve a working
TaskClient.

I appreciate your help.

Thanks
___
rules-users mailing list
rules-users@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users