Author: tsurdilovic
Date: 2010-01-06 13:55:53 -0500 (Wed, 06 Jan 2010)
New Revision: 11917
Added:
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeSessionManager.java
Modified:
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeBaseManager.java
Log:
Drools 5 integration.
Modified:
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeBaseManager.java
===================================================================
---
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeBaseManager.java 2010-01-06
18:29:52 UTC (rev 11916)
+++
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeBaseManager.java 2010-01-06
18:55:53 UTC (rev 11917)
@@ -139,9 +139,8 @@
addEventListener(kbase, eventListener);
}
}
- }
+ }
-
private void addEventListener(org.drools.KnowledgeBase kbase, String eventListener) {
try {
@SuppressWarnings("unchecked")
Added:
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeSessionManager.java
===================================================================
--- modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeSessionManager.java
(rev 0)
+++
modules/drools/trunk/src/main/java/org/jboss/seam/drools/KnowledgeSessionManager.java 2010-01-06
18:55:53 UTC (rev 11917)
@@ -0,0 +1,39 @@
+package org.jboss.seam.drools;
+
+import javax.enterprise.context.Dependent;
+import javax.enterprise.inject.Produces;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.inject.Inject;
+
+import org.drools.KnowledgeBase;
+import org.drools.runtime.StatefulKnowledgeSession;
+import org.drools.runtime.StatelessKnowledgeSession;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * Manager component for a Drools Knowledge Sessions.
+ *
+ * @author Tihomir Surdilovic
+ */
+@Dependent
+public class KnowledgeSessionManager
+{
+ private static final Logger log =
LoggerFactory.getLogger(KnowledgeSessionManager.class);
+
+ @Inject
+ BeanManager manager;
+
+ @Inject
+ KnowledgeBase kbase;
+
+ @Produces
+ public StatefulKnowledgeSession getStatefulSession() {
+ return null; // for now
+ }
+
+ @Produces
+ public StatelessKnowledgeSession getStatelessSession() {
+ return null; // for now
+ }
+}
Show replies by date