Repository: incubator-stratos Updated Branches: refs/heads/master 15e535332 -> a5304ee66
Added Apache License Header to org.apache.stratos.autoscaler component Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/cc73b386 Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/cc73b386 Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/cc73b386 Branch: refs/heads/master Commit: cc73b3866824c5dd482888ad37c679ac334f2eb5 Parents: cf15bd6 Author: M. Isuru Tharanga Chrishantha Perera <[email protected]> Authored: Mon Mar 31 17:46:54 2014 +0530 Committer: M. Isuru Tharanga Chrishantha Perera <[email protected]> Committed: Mon Mar 31 17:46:54 2014 +0530 ---------------------------------------------------------------------- .../stratos/autoscaler/AutoscalerContext.java | 20 +++++++ .../apache/stratos/autoscaler/Constants.java | 21 +++++++ .../exception/InvalidPartitionException.java | 21 +++++++ .../exception/PartitionValidationException.java | 21 +++++++ .../exception/PolicyValidationException.java | 21 +++++++ .../autoscaler/exception/SpawningException.java | 21 +++++++ .../exception/TerminationException.java | 21 +++++++ .../interfaces/AutoScalerServiceInterface.java | 21 +++++++ .../autoscaler/registry/RegistryManager.java | 21 +++++++ .../apache/stratos/autoscaler/rule/RuleLog.java | 21 +++++++ .../autoscaler/rule/RuleTasksDelegator.java | 21 +++++++ .../stratos/autoscaler/util/Serializer.java | 21 +++++++ .../autoscaler/util/ServiceReferenceHolder.java | 21 +++++++ .../stratos/autoscaler/TestBasicRules.java | 60 -------------------- 14 files changed, 272 insertions(+), 60 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java index 4c78dbb..8bfb8e6 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/AutoscalerContext.java @@ -1,3 +1,23 @@ +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * + */ package org.apache.stratos.autoscaler; import org.apache.commons.logging.Log; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java index 6e9c5e4..8b2f787 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/Constants.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + /** * http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java index 9a8cc68..f4b7ce4 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/InvalidPartitionException.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.exception; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + /** * http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java index f4e20b1..0a5789e 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PartitionValidationException.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.exception; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + /** * http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java index 4cf9592..eb236cc 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/PolicyValidationException.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.exception; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + /** * http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java index 952f299..4b6e62f 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/SpawningException.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.exception; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + /** * http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java index 356ec34..720c186 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/exception/TerminationException.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.exception; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + public class TerminationException extends Throwable { http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java index cc2638d..c96d4fa 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/interfaces/AutoScalerServiceInterface.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.interfaces; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import org.apache.stratos.autoscaler.deployment.policy.DeploymentPolicy; import org.apache.stratos.autoscaler.exception.AutoScalerException; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java index de04acf..7b3413e 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/registry/RegistryManager.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.registry; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleLog.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleLog.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleLog.java index 3cf21d2..bab4710 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleLog.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleLog.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.rule; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java index 141bfd3..7d8304b 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/RuleTasksDelegator.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.rule; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/Serializer.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/Serializer.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/Serializer.java index e0e19a5..2f38e84 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/Serializer.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/Serializer.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.util; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import java.io.ByteArrayOutputStream; import java.io.IOException; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/ServiceReferenceHolder.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/ServiceReferenceHolder.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/ServiceReferenceHolder.java index eac4c60..00629dc 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/ServiceReferenceHolder.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/util/ServiceReferenceHolder.java @@ -1,4 +1,25 @@ package org.apache.stratos.autoscaler.util; +/* + * + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + * +*/ + import org.wso2.carbon.registry.core.Registry; import org.wso2.carbon.registry.core.session.UserRegistry; http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/cc73b386/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestBasicRules.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestBasicRules.java b/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestBasicRules.java deleted file mode 100644 index a816704..0000000 --- a/components/org.apache.stratos.autoscaler/src/test/java/org/apache/stratos/autoscaler/TestBasicRules.java +++ /dev/null @@ -1,60 +0,0 @@ -//package org.apache.stratos.autoscaler; -// -//import static org.junit.Assert.assertEquals; -// -//import org.drools.KnowledgeBase; -//import org.drools.KnowledgeBaseFactory; -//import org.drools.builder.KnowledgeBuilder; -//import org.drools.builder.KnowledgeBuilderError; -//import org.drools.builder.KnowledgeBuilderErrors; -//import org.drools.builder.KnowledgeBuilderFactory; -//import org.drools.builder.ResourceType; -//import org.drools.io.ResourceFactory; -//import org.drools.logger.KnowledgeRuntimeLogger; -//import org.drools.logger.KnowledgeRuntimeLoggerFactory; -//import org.drools.runtime.StatefulKnowledgeSession; -//import org.junit.Before; -//import org.junit.Test; -// -//public class TestBasicRules { -// -// private KnowledgeBase kbase; -// -// @Before -// public void setup() { -// KnowledgeBuilder kbuilder = KnowledgeBuilderFactory.newKnowledgeBuilder(); -// kbuilder.add(ResourceFactory.newClassPathResource("basic.drl"), ResourceType.DRL); -// KnowledgeBuilderErrors errors = kbuilder.getErrors(); -// if (errors.size() > 0) { -// for (KnowledgeBuilderError error: errors) { -// System.err.println(error); -// } -// throw new IllegalArgumentException("Could not parse knowledge."); -// } -// kbase = KnowledgeBaseFactory.newKnowledgeBase(); -// kbase.addKnowledgePackages(kbuilder.getKnowledgePackages()); -// -// -// } -// -// @Test -// public void testBasic() { -// -// StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession(); -// KnowledgeRuntimeLogger logger = KnowledgeRuntimeLoggerFactory.newFileLogger(ksession, "test"); -// -// RoolVO vo = new RoolVO(); -// vo.setStringValue("Learning to drool"); -// vo.setBooleanValue(true); -// ksession.insert(vo); -// ksession.fireAllRules(); -// for (Object o: ksession.getObjects()) { -// if(o instanceof RoolVO) { -// assertEquals("Done.", ((RoolVO) o).getStringValue()); -// } -// } -// logger.close(); -// -// } -// -//} \ No newline at end of file
