Great to hear that you are using it. <br>Obviously need some improvements. I will try to help you guys on that.<br>Would be nice to activate the debugging option of MS SqlServer to see the queries that are being generated. If you have that information please let me know.<br>
Greetings.<br><br><div class="gmail_quote">2009/10/16 Bill Tarr <span dir="ltr">&lt;<a href="mailto:javatestcase@yahoo.com">javatestcase@yahoo.com</a>&gt;</span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><div>Hi Mauricio,</div>
<div> </div>
<div>I don&#39;t actually have a stack trace. Every time I&#39;ve run the test, it has completed without errors exactly once.  </div>
<div> </div>
<div>There is nothing in the stack indicating anything bad happened, but immediately after SQL Server is unresponsive to any clients.<br></div>
<div>As to Hibernate Mappings, you are ahead of me already.  </div>
<div> </div>
<div>I am currently testing with annotated JPA entities (for Claims and Role) which mirror my real Hibernate mapped entities.</div>
<div> </div>
<div>I&#39;ve haven&#39;t found anything absolute on this, but think you CAN&#39;T use Hibernate mappings within JPA.</div>
<div> </div>
<div>That means we will need a new Variable Persister, but presumably one similar to the JPA Persister.</div>
<div> </div>
<div>I&#39;ll be testing more today, as I&#39;ll can and let you know if my DBA can get any more info to see if SQL Server is telling us anything useful.</div>
<div> </div>
<div>Thanks!  And great work on the variable persister, the timing was perfect for us!</div>
<div> </div>
<div>Bill</div>
<div> </div>
<div style="font-family: arial,helvetica,sans-serif; font-size: 12pt;"><br>
<div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><font face="Tahoma" size="2">
<hr size="1">
<b><span style="font-weight: bold;">From:</span></b> Mauricio Salatino &lt;<a href="mailto:salaboy@gmail.com" target="_blank">salaboy@gmail.com</a>&gt;<br><b><span style="font-weight: bold;">To:</span></b> Rules Users List &lt;<a href="mailto:rules-users@lists.jboss.org" target="_blank">rules-users@lists.jboss.org</a>&gt;<br>
<b><span style="font-weight: bold;">Sent:</span></b> Fri, October 16, 2009 4:41:46 AM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [rules-users] [droolsflow] JPAVariablePersister Crashing SQL Server RPC?<br>
</font><div><div></div><div class="h5"><br>HI Bill,<br>Can you paste here the full stack trace?<br>I don&#39;t test it in SQL Server, but if the problem persist I&#39;m interested in solve it.<br>Some thoughts:<br>1) does JPA take the Hibernate Mappings as JPA entities without adding them at the persistence.xml file?, I think yes, but I&#39;m not sure<br>
2) if not, probably we need to create a new persister for hibernate mapped entities.<br><br><br>
<div class="gmail_quote">On Thu, Oct 15, 2009 at 9:26 PM, Bill Tarr <span dir="ltr">&lt;<a href="mailto:javatestcase@yahoo.com" rel="nofollow" target="_blank">javatestcase@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">Has anyone successfully used JPAVariablePersister on Sql Server?  The quick hits are we are running MSSQL 2008, and after introducing JPAVariablePersister (which is described very well in <a href="http://blog.athico.com/2009/09/drools-flow-variable-persistence.html" target="_blank">http://blog.athico.com/2009/09/drools-flow-variable-persistence.html</a>) every time I run my test case, the DB becomes non-responsive, returning from any JDBC pings:<br>
<br>    java.sql.SQLException: I/O Error: DB server closed connection.<br><br>You can&#39;t even connect through MSSQL Management Studios, looks like RPC service has gone down.  Haven&#39;t been able to do much troubleshooting yet (slow going when you need to get a DBA to reboot your sever every time.)<br>
<br>I&#39;ve already tested out the JPAKnowledgeService with some success.  Setting up my session with the following code,  I can see the SessionInfo,
 ProcessInstanceInfo, ProcessInstanceInfo_eventTypes tables storing data, looks pretty solid, and I can grab the processes again.<br><br>    EntityManagerFactory emf = Persistence.createEntityManagerFactory(&quot;org.drools.persistence.jpa&quot;);<br>
    env = KnowledgeBaseFactory.newEnvironment();<br>    env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);<br>    session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgeBase, null, env);<br><br>    Map&lt;String, Object&gt; parameterMap = new HashMap&lt;String, Object&gt;();<br>
    parameterMap.put(&quot;claim&quot;, claim);<br>    processInstance = session.startProcess(CLAIMS_DEMO, parameterMap);<br><br>I want to store my variable separately though, as we already have them as Hibernate DTOs.  So I added the following code, as well as adding JPAVariablePersister to my
 persistence.xml.<br><br>    VariablePersistenceStrategyFactory.getVariablePersistenceStrategy()<br>            .setPersister(&quot;javax.persistence.Entity&quot;,<br>                    &quot;org.drools.persistence.processinstance.persisters.JPAVariablePersister&quot;);<br>
<br>The code appears to run through.  This time, I can see data in  the SessionInfo, ProcessInstanceInfo, ProcessInstanceInfo_eventTypes tables, as well as additional data in VariableInstanceInfo, and my two entities (Claim, which has a List of Role.)  The data looks pretty good, and my process logs hit the expected nodes.<br>
 <br>Anyway, I&#39;ll post more as I learn it.  Let me know if anyone else is running into
 this.<br> <br>Thanks!<br> <br>Bill<br><br><br><br><br>_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org" rel="nofollow" target="_blank">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" rel="nofollow" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br></blockquote></div><br><br clear="all"><br>-- <br>- <a href="http://salaboy.wordpress.com" target="_blank">http://salaboy.wordpress.com</a><br>
- <a href="http://www.jbug.com.ar" target="_blank">http://www.jbug.com.ar</a><br>- Salatino &quot;Salaboy&quot; Mauricio -<br></div></div></div></div></div><br>

      </div><br>_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br> - <a href="http://salaboy.wordpress.com">http://salaboy.wordpress.com</a><br> - <a href="http://www.jbug.com.ar">http://www.jbug.com.ar</a><br> - Salatino &quot;Salaboy&quot; Mauricio -<br>