Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 847784 Details for
Bug 1050196
CDIHelper does not take kjar into account during wiringListnerAndWIHs
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
Reproducer code
Reproducer.java (text/x-java), 3.01 KB, created by
Adam Baxter
on 2014-01-09 19:26:08 UTC
(
hide
)
Description:
Reproducer code
Filename:
MIME Type:
Creator:
Adam Baxter
Created:
2014-01-09 19:26:08 UTC
Size:
3.01 KB
patch
obsolete
>package org.jbpm.ee.reproducer; > >import static org.jbpm.persistence.util.PersistenceUtil.JBPM_PERSISTENCE_UNIT_NAME; >import static org.jbpm.persistence.util.PersistenceUtil.setupWithPoolingDataSource; >import static org.junit.Assert.*; > >import java.util.HashMap; > >import javax.naming.InitialContext; >import javax.naming.NamingException; >import javax.persistence.EntityManagerFactory; >import javax.transaction.HeuristicMixedException; >import javax.transaction.HeuristicRollbackException; >import javax.transaction.NotSupportedException; >import javax.transaction.RollbackException; >import javax.transaction.SystemException; >import javax.transaction.UserTransaction; > >import org.drools.compiler.kproject.ReleaseIdImpl; >import org.jbpm.runtime.manager.impl.KModuleRegisterableItemsFactory; >import org.jbpm.runtime.manager.impl.RuntimeEnvironmentBuilder; >import org.jbpm.test.util.AbstractBaseTest; >import org.junit.Before; >import org.junit.BeforeClass; >import org.junit.Test; >import org.kie.api.KieServices; >import org.kie.api.builder.KieScanner; >import org.kie.api.builder.ReleaseId; >import org.kie.api.runtime.EnvironmentName; >import org.kie.api.runtime.KieContainer; >import org.kie.api.runtime.KieSession; >import org.kie.api.runtime.manager.RuntimeEngine; >import org.kie.api.runtime.manager.RuntimeEnvironment; >import org.kie.api.runtime.manager.RuntimeManager; >import org.kie.api.runtime.manager.RuntimeManagerFactory; >import org.kie.internal.runtime.manager.context.ProcessInstanceIdContext; > >public class Reproducer extends AbstractBaseTest { > > private static final ReleaseId releaseId = new ReleaseIdImpl("com.redhat.demo", "testProj", "1.0-SNAPSHOT"); > > private static KieServices kieServices; > > private static HashMap<String, Object> context; > > @BeforeClass > public static void setup() { > kieServices = KieServices.Factory.get(); > context = setupWithPoolingDataSource(JBPM_PERSISTENCE_UNIT_NAME); > } > > @Test > public void test() throws NamingException, NotSupportedException, SystemException, SecurityException, IllegalStateException, RollbackException, HeuristicMixedException, HeuristicRollbackException { > EntityManagerFactory emf = (EntityManagerFactory) context.get(EnvironmentName.ENTITY_MANAGER_FACTORY); > UserTransaction ut = InitialContext.doLookup("java:comp/UserTransaction"); > ut.begin(); > KieContainer kieContainer = kieServices.newKieContainer(releaseId); > KieScanner kieScanner = kieServices.newKieScanner(kieContainer); > kieScanner.start(3000L); > > RuntimeEnvironment re = RuntimeEnvironmentBuilder.Factory.get() > .newDefaultBuilder() > .entityManagerFactory(emf) > .knowledgeBase(kieContainer.getKieBase()) > .registerableItemsFactory(new KModuleRegisterableItemsFactory(kieContainer, null)) > .get(); > RuntimeManager runtimeManager = > RuntimeManagerFactory.Factory.get() > .newPerProcessInstanceRuntimeManager(re, releaseId.toString()); > RuntimeEngine engine = runtimeManager.getRuntimeEngine(ProcessInstanceIdContext.get()); > KieSession kieSession = engine.getKieSession(); > ut.commit(); > kieSession.dispose(); > } > >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 1050196
: 847784