[JBoss jBPM] - Custom instantiator specified with 'config-type' on a Delega
by pirx
I'm using a custom instantiator for action delegation by specifying the fully qualified class name like in
| <action config-type="com.consol.cmas.workflow.jbpm.exe.SpringInstantiator"
| class="com.consol.cmas.projects.it.workflow.development.AssignCallToReviewerActionHandler"/>
|
According to the relevant code in the Delegation class this should work (and indeed worked in some pre 3.2 versions):
| Instantiator instantiator = null;
| try {
| // find the instantiator
| instantiator = (Instantiator) instantiatorCache.get(configType);
| if (instantiator == null) {
| // load the instantiator class
| Class instantiatorClass = classLoader.loadClass(configType);
| // instantiate the instantiator with the default constructor
| instantiator = (Instantiator) instantiatorClass.newInstance();
| instantiatorCache.put(configType, instantiator);
| }
| } catch (Exception e) {
| log.error(e);
| throw new JbpmException("couldn't instantiate custom instantiator '" + configType + "'", e);
| }
|
However, now I get an validation error on the xml stating:
| org.jbpm.jpdl.JpdlException: [[ERROR] line 39: cvc-enumeration-valid: Value 'com.consol.cmas.workflow.jbpm.exe.SpringInstantiator' is not facet-valid with respect to enumeration '[field, bean, constructor, configuration-property]'. It must be a value from the enumeration.,
and indeed, the schema declaration looks like:
| <xs:attribute name="config-type" default="field">
| <xs:simpleType>
| <xs:restriction base="xs:string">
| <xs:enumeration value="field"/>
| <xs:enumeration value="bean"/>
| <xs:enumeration value="constructor"/>
| <xs:enumeration value="configuration-property"/>
| </xs:restriction>
| </xs:simpleType>
| </xs:attribute>
|
My question is, whether it is possible to relax the schema restriction in order to use a custom instantiator again ? Or is there now another possibility for custom instantiation of action handler ?
I'm using jbpm-jpdl 3.2.1
thanx ...
...roland huss
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070165#4070165
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070165
18Â years, 8Â months
[Performance Tuning] - JNDI datasource connection pooling
by lorenz.fischer
hi all,
i'm trying to find the optimal settings for the parameters min-pool-size and max-pool-size for my jndi datasource which connects to a oracle database.
does anybody know of a good site, doc or forum post that describes those parameters (thoroughly)?
as far as i'm concerned the min-pool-size defines the number of connections that (once opened) stay open even if the connections are idle. the max-pool-size parameter defines how many connections can be handled by the pool concurrently at max. so all the connections between min and max-pool-size are closed (if idle for at least idle-timeout-minutes) and reopened (if more than min-pool-size connections are required) again.
on some site (unfortunately lost the link) i once read, that setting the min-pool-size equal to the max-pool-size might result in a performance gain since jboss does not need in any case to close/reopen database connections. does anybody have experience with that? another question - given an unlimited amount of available connections - is there any reason not to set the two parameters equal to each other; except for the fact, that there might be max-pool-size connections to the database idling?
any hints are greatly appreciated :-)
cheers
lorenz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070164#4070164
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070164
18Â years, 8Â months
[Installation, Configuration & DEPLOYMENT] - Inner bean should have scope=
by mnsweeps
This project has been working and even today is working in production. But in our QA system it started giving us this error.
My parent bean has singleton="false" and one of its properties is another inner bean which has singleton="true". During runtime in QA its giving us the error in subject line. It might work if i change singleton="False" on the inner bean. But then how is it working in production even today?
"smsCommand" bean has singleton="false". Inner bean "transactionIdFactory" has singleton="false".
This is my code in descriptor xml file..
<bean id="transactionId" factory-bean="transactionIdFactory" factory-method="getNextId" />
${transaction.id.sequen ce.name}
<constructor-arg>
</constructor-arg>
Error i get is
Cannot create inner bean 'transactionId' while setting bean property 'transactionNumber'; nested exception is org.springframework.beans.factory.BeanDefinitionSt oreException: Inner bean definition 'transactionId' for bean property 'transactionNumber' has scope 'singleton' but containing bean definition 'initializeIcc' does not. Mark the inner bean definition with scope 'prototype' instead.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070162#4070162
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070162
18Â years, 8Â months
[JBoss Seam] - Re: show me the right way to access row of datatable with Se
by tim_ph
Holly cow! Today, it just works. No problem at all. You are my lucky star, Pete.
I removed all the clutters, and leave minimal code in there. Even though I don't like the part where I have to use single string name for Factory, I have to use it for now rather spend more time on this.
Here's complete code
| <h:outputLabel value="No Personnel assigned yet" rendered="#{empty personnels}"/>
| <rich:dataTable var="personnel"
| value="#{personnels}"
| rendered="#{not empty personnels}"
| rowClasses="rvgRowOne,rvgRowTwo"
| id="personnelTable">
| <h:column>
| <f:facet name="header">action</f:facet>
| <h:commandLink value="Select" action="#{applicationHome.selectPersonnel}"/>
| </h:column>
| </rich:dataTable>
|
and ApplicationHome.java
| @Name("applicationHome")
| public class ApplicationHome extends EntityHome<Application>
| {
| ...
| @DataModel
| private List<Personnel> personnels;
|
| @Factory("personnels")
| public void fillPersonnels()
| {
| if (personnels == null)
| personnels = getInstance() == null ? null : new ArrayList<Personnel>(getInstance().getPersonnels());
| }
|
| @DataModelSelection
| private Personnel personnel;
|
| @Logger Log log;
|
| public void selectPersonnel()
| {
| if (personnel == null) log.info("personnel is null");
| else log.info("you have selected personnel " + personnel.getName());
| }
| }
|
Using s:link and s:button will reload the whole page, so I have to use h:commandLink and h:commandButton. personnel can then be used to display more info on the same page.
Thank you guys, smithbstl and Pete.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4070159#4070159
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4070159
18Â years, 8Â months