I'm running 5.2.0.SNAPSHOT here. What I did is to add a new test in JPASingleSessionCommandServiceFactoryTest:

    @Test
    public void testAgents() throws Exception {      
        KnowledgeAgentImpl kagent1 = ( KnowledgeAgentImpl ) ctx.getBean( "kagent1" );        
    } 

I also have added the agent's definition into beans.xml:

<drools:kagent id="kagent1" kbase="kbProcessWorkItems" new-instance="true" />

The test works. Could you try this same test in 5.1.0? Maybe we are dealing with an already fixed bug. Again, that is why I'm asking you for an isolated test case.

Best,

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Esteban Aliverti
- Developer @ http://www.plugtree.com
- Blog @ http://ilesteban.wordpress.com


On Wed, Oct 13, 2010 at 1:38 PM, krkaleraj <krkaleraj@gmail.com> wrote:

Thanks for the response.

In fact, I have seen these files earlier. Moreover I am just trying to run
the test provided which is not working. The file you mentioned has kagent
but missing persistence configuration. I doubt this issue comes while you
are trying to configure JPA.

Please configure kagent in beans.xml provided at
org/drools/container/spring/bean/persistence/beans.xml

I want to configure a kagent for the below kbase configured in that file and
should use in ksession mentioned below.

<drools:kbase id="kbProcessWorkItems" node="node1">
.....

<drools:ksession id="jpaSingleSessionCommandService" type="stateful"
kbase="kbProcessWorkItems">
.....

Regards,
K R Kaleraj
--
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/Drools-Spring-Config-for-Knowledge-Agent-tp1634280p1695637.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