[JBoss Web Services] - Can I modify the HandlerChain at deploy time?
by Paul Robinson
Paul Robinson [http://community.jboss.org/people/paul.robinson] created the discussion
"Can I modify the HandlerChain at deploy time?"
To view the discussion, visit: http://community.jboss.org/message/641087#641087
--------------------------------------------------------------
I am improving the usability of JBoss XTS by providing annotation support. I have one class level annotation that when applied to a JAX-WS service implementation, indicates to the middleware to carry out a few pieces of work, removing a lot of burden from the developer.
One of these "pieces of work" is to add two handlers to the JAX-WS handler chain. Using CDI I can intercept the calls to the service, but this occurs after the handler chain has been invoked. I was thinking that at some point in the deployment process, I could query the Service Impl class for the required annotation, and if found, setup the appropriate handler chain.
I was wondering:
a) Is what I am proposing the right way to do this?
b) If so, can you point me at the right place to hook into?
c) Do you know of a better way for me to achieve this?
Any help would be greatly appreciated,
Thanks,
Paul.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641087#641087]
Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[JBoss Microcontainer] - how to set 'UseJBossWebLoader' in jboss-6.0.0 - CR1
by swapnil narvekar
swapnil narvekar [http://community.jboss.org/people/swapnil_narya] created the discussion
"how to set 'UseJBossWebLoader' in jboss-6.0.0 - CR1"
To view the discussion, visit: http://community.jboss.org/message/641011#641011
--------------------------------------------------------------
Hello All,
I need to set 'UseJBossWebLoader' property to false.
But I could not find it in war-deployers-jboss-beans.xml for the bean - '*WarDeployer'*
*
*
File path : *{JBOSS_HOME}\server\default\deployers\jbossweb.deployer\META-INF\war-deployers-jboss-beans.xml*
14:41:13,167 ERROR [AbstractKernelController] Error installing to Configured: name=WarDeployer state=Instantiated: java.lang.RuntimeException: Error configuring property: useJBossWebLoader for WarDeployer
at org.jboss.kernel.plugins.dependency.ConfigureAction.dispatchSetProperty(ConfigureAction.java:112) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.ConfigureAction.setAttributes(ConfigureAction.java:85) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.ConfigureAction.installActionInternal(ConfigureAction.java:44) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:894) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:641) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:182) [:2.2.0.Alpha8]
at org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer.deploy(BeanMetaDataDeployer.java:58) [:2.2.0.Alpha8]
at org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer.internalDeploy(AbstractSimpleRealDeployer.java:62) [:2.2.0.Alpha8]
at org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer.deploy(AbstractRealDeployer.java:55) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployerWrapper.deploy(DeployerWrapper.java:179) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doDeploy(DeployersImpl.java:1832) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1550) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployersImpl.doInstallParentFirst(DeployersImpl.java:1571) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployersImpl.install(DeployersImpl.java:1491) [:2.2.0.Alpha8]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.deployers.plugins.deployers.DeployersImpl.change(DeployersImpl.java:1983) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.deployers.DeployersImpl.process(DeployersImpl.java:1076) [:2.2.0.Alpha8]
at org.jboss.deployers.plugins.main.MainDeployerImpl.process(MainDeployerImpl.java:679) [:2.2.0.Alpha8]
at org.jboss.system.server.profileservice.deployers.MainDeployerPlugin.process(MainDeployerPlugin.java:106) [:6.0.0.20101110-CR1]
at org.jboss.profileservice.dependency.ProfileControllerContext$DelegateDeployer.process(ProfileControllerContext.java:130) [:0.1.0.Alpha1]
at org.jboss.profileservice.dependency.ProfileDeployAction.deploy(ProfileDeployAction.java:148) [:0.1.0.Alpha1]
at org.jboss.profileservice.dependency.ProfileDeployAction.installActionInternal(ProfileDeployAction.java:94) [:0.1.0.Alpha1]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:54) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.kernel.plugins.dependency.InstallsAwareAction.installAction(InstallsAwareAction.java:42) [jboss-kernel.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.SimpleControllerContextAction.simpleInstallAction(SimpleControllerContextAction.java:62) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.action.AccessControllerContextAction.install(AccessControllerContextAction.java:71) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContextActions.install(AbstractControllerContextActions.java:51) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractControllerContext.install(AbstractControllerContext.java:379) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.install(AbstractController.java:2044) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.incrementState(AbstractController.java:1083) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.executeOrIncrementStateDirectly(AbstractController.java:1322) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1246) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.resolveContexts(AbstractController.java:1139) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:939) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.dependency.plugins.AbstractController.change(AbstractController.java:654) [jboss-dependency.jar:2.2.0.Alpha10]
at org.jboss.profileservice.dependency.ProfileServiceController.activate(ProfileServiceController.java:188) [:0.1.0.Alpha1]
at org.jboss.profileservice.AbstractProfileService.activateProfile(AbstractProfileService.java:170) [:0.1.0.Alpha1]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.activate(AbstractProfileServiceBootstrap.java:117) [:0.1.0.Alpha1]
at org.jboss.profileservice.resolver.BasicResolverFactory$ProfileResolverFacade.deploy(BasicResolverFactory.java:89) [:0.1.0.Alpha1]
at org.jboss.profileservice.bootstrap.AbstractProfileServiceBootstrap.start(AbstractProfileServiceBootstrap.java:97) [:0.1.0.Alpha1]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:130) [:6.0.0.20101110-CR1]
at org.jboss.system.server.profileservice.bootstrap.BasicProfileServiceBootstrap.start(BasicProfileServiceBootstrap.java:56) [:6.0.0.20101110-CR1]
at org.jboss.bootstrap.impl.base.server.AbstractServer.startBootstraps(AbstractServer.java:827) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
at org.jboss.bootstrap.impl.base.server.AbstractServer$StartServerTask.run(AbstractServer.java:417) [jboss-bootstrap-impl-base.jar:2.1.0-alpha-5]
Can you tell me , how can I set this property?
thanks..
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641011#641011]
Start a new discussion in JBoss Microcontainer at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - How to read external parameters from within a process?
by Umar Ashfaq
Umar Ashfaq [http://community.jboss.org/people/umarm] created the discussion
"How to read external parameters from within a process?"
To view the discussion, visit: http://community.jboss.org/message/641043#641043
--------------------------------------------------------------
Here's my code that starts a process:
StatefulKnowledgeSession ksession = kbase.newStatefulKnowledgeSession();
Map<String, Object> params = new HashMap<String, Object>();
params.put("doctorsDecision", "L1"); ksession.startProcess("MyProcess", params);
And here's how I expect this variable to be available in MyProcess. This is the Action of one of my script tasks in MyProcess:
System.out.println("doctorsDecision: "+doctorsDecision);
Is this the right way to access external variables from within a process?
P.S.
When I run my application, the process definition is never added to knowledge base because jBPM doesn't seem to recognize doctorsDecision variable. How can I tell jBPM that this variable is external and it's value will be provided on runtime? I am using BPMN2 files.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/641043#641043]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[EJB3] - build path configuration on jboss 7.0.2
by Joseph Hwang
Joseph Hwang [http://community.jboss.org/people/aupres] created the discussion
"build path configuration on jboss 7.0.2"
To view the discussion, visit: http://community.jboss.org/message/640949#640949
--------------------------------------------------------------
My development environment is JBoss 7 and Eclipse Indigo.
I made ejb jar project. Jar project has EJB interface and EJB bean. Deployment was successful.
I also made jsp war project. And in java build path menu I set link with ejb3 jar project i made on project tab.
But exception is thrown like below :
org.apache.jasper.JasperException: Unable to compile class for JSP:
An error occurred at line: 7 in the generated java file
Only a type can be imported. com.aaa.ejb3.IEJBHelloWorldPort resolves to a package
An error occurred at line: 17 in the jsp file: /display.jsp
IEJBHelloWorldPort cannot be resolved to a type
14: <%
15: try {
16: Context ctx = new InitialContext();
17: IEJBHelloWorldPort hello = (IEJBHelloWorldPort) ctx.lookup("EJBHelloWorldBean/remote");
18: String id = request.getParameter("id");
This process worked well in JBoss 5.1. I have no idea what is wrong. Is there another process to
configure build path link of ejb jar project with web project on eclipse indigo?
Pls, inform me.
Thanks in advance and Merry Christams :)
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/640949#640949]
Start a new discussion in EJB3 at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month
[jBPM] - Joining JBPM transaction with my current application's transaction
by Zeliang Huang
Zeliang Huang [http://community.jboss.org/people/ossa] created the discussion
"Joining JBPM transaction with my current application's transaction"
To view the discussion, visit: http://community.jboss.org/message/640954#640954
--------------------------------------------------------------
Hi Guys,
I am quite inexperienced with JTA & JPA. I am trying to join JBPM5.1 transaction with my current application's transaction.
In my current application, I had obtained the transaction using things like this:
building the sessionFactotry:
//my current application uses the hibernate.cfg.xml
Configuration config = new Configuration().configure();
SessionFactory factory = new Configuration().configure().buildSessionFactory();
Usering the session factory:
factory.getCurrentSession().beginTransaction();
//do CRUD
factory.getCurrentSession().commit();
In the persistence.xml of jbpm-persistence-jpa-5.1.0.Final.jar I had put
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<persistence version="1.0"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd
http://java.sun.com/xml/ns/persistence/orm http://java.sun.com/xml/ns/persistence/orm_1_0.xsd"
xmlns:orm="http://java.sun.com/xml/ns/persistence/orm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/persistence">
<persistence-unit name="org.jbpm.persistence.jpa"
transaction-type="JTA">
<provider>org.hibernate.ejb.HibernatePersistence</provider>
<jta-data-source>same-datasource-as-my-current-applications</jta-data-source>
<class>org.drools.persistence.info.SessionInfo</class>
<class>org.jbpm.persistence.processinstance.ProcessInstanceInfo</class>
<class>org.drools.persistence.info.WorkItemInfo</class>
<class>org.jbpm.process.audit.ProcessInstanceLog</class>
<class>org.jbpm.process.audit.NodeInstanceLog</class>
<class>org.jbpm.process.audit.VariableInstanceLog</class>
<properties>
<property name="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect" />
<property name="hibernate.max_fetch_depth" value="3" />
<!-- <property name="hibernate.hbm2ddl.auto" value="update" /> -->
<property name="hibernate.show_sql" value="false" />
<property name="hibernate.transaction.manager_lookup_class"
value="org.hibernate.transaction.WeblogicTransactionManagerLookup" />
</properties>
</persistence-unit>
</persistence>
In my JBPM StatefulKnowledgeSession creation, I had done something like this.
Environment env = KnowledgeBaseFactory.newEnvironment();
env.set(EnvironmentName.ENTITY_MANAGER_FACTORY, emf);
StatefulKnowledgeSession session = JPAKnowledgeService.newStatefulKnowledgeSession(knowledgebase, null, env);
I am able to manage transactions of both side separately by doing something like:
//commit to my application tables first
factory.getCurrentSession().beginTransaction();
//do CRUD
factory.getCurrentSession().commit();
//then commit to jbpm tables.
UserTransaction ut = (UserTransaction) new InitialContext().lookup("java:comp/UserTransaction");
ut.begin();
....
ut.commit();
This is working ok. But I prefer to combine the two transaction into one since they are supposed to be one work-unit.
I had trying for a week for to no avail. I am also quite confused with the fact that some hibernate apps are using hibernate.cfg.xml and some are using JPA specific persistence.xml . There are multiple copies of these XML files in different jars. I just couldn't get the whole picture of the thing. Any help is greately appreciated !
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/640954#640954]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 1 month