[JBoss Seam] - Re: Problem: Custom validate methods in EJBs crash
by CptnKirk
And required checking happens outside of conversion/validation at yet another time. Unfortunately, JSF seems to be designed to support providing a consistent checked state through each phase of the lifecycle and short circuit phases if there are problems. This almost explicitly designs away your desire to collect all this information and display it at once.
I don't see a JSF provided solution to this problem in 1.2 (Gavin has mucked more with the internals though, maybe he knows better). It seems to me the easiest solution would be to ditch JSF validation and simply validate yourself within the application. Use the framework or not, but don't fight it.
There may be a way to reuse your existing validator classes and write a custom phase listener that would provide your own hooks to the validation phase, but then you'd be using your own validator framework and not JSFs (no UI component tie in). I just don't think JSF was designed to give you what you want.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970191#3970191
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970191
19 years, 7 months
[JBoss Eclipse IDE (users)] - Re: Building mutiple MDB deployments using xdoclet
by kapilanand
Here is what I finally did to make it work.
Edited the xdoclet-build.xml generated by JBossEclipseIDE.
Added multiple antcall tasks inside "_xdoclet_generation_" target, to call runEjbDoclet target with different params.
(runEjbDoclet was originally called Nxxxxx in the auto-generated xml, where x is a digit)
<param name="mdb_display_name"value="MyMDBName"/>
Used destDir="${ejb_gen_dest}" in ejbdoclet task called by runEjbDoclet.
Used the following xdoclet entries in the Bean class.
/**
* @ejb.bean name="${mdb_name}"
* display-name="${mdb_display_name}"
* description="${mdb_description}"
* destination-type="${jms_dest_type}"
* acknowledge-mode="Auto-acknowledge"
* transaction-type="Container"
*
* @ejb:env-entry name="SSBToUse" type="java.lang.String"
* value="${SSB1_jndi_name}"
*
* @jboss.destination-jndi-name name = "${jms_dest_name}"
*/
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970188#3970188
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970188
19 years, 7 months
[JBoss Seam] - Calling a method from within code that has @CreateProcess do
by asachde
I have a business process that is called from a method that is invoked from a pageflow. If I add @CreateProcess to the method which is invoked from the pageflow the process starts and variables are available on the page.
HOWEVER if I want to use the variables in the SLSB or POJO I cant seem to get access to them. If I extract the creation of the new process then the process gets created but I have to signal it and I dont have access to any of the processInstance or the token! What's the SEAM way of doing so.
WHAT WORKS:
1) PageFlow has
< action expression="#{login.logmein}" / >
2) My POJO method is declared as
@CreateProcess(definition="asyncProcess")
public String logmein()
3) My variable is declared as
@Out(scope=ScopeType.BUSINESS_PROCESS)
public CustomerBean getCust() {
return cust;
}
4) My JSF has
< h:outputText value="#{login.cust.streetaddress}"/ >
5) Alternatively I could remove the @CreateProcess and write the following code where I do have programatic access to the altered cust variable
org.jbpm.graph.exe.ProcessInstance pi = JbpmConfiguration.getInstance().createJbpmContext().getGraphSession().findLatestProcessDefinition("asyncProcess").createProcessInstance();
Token token = pi.getRootToken();
pi.getContextInstance().setVariable("cust", cust);
token.signal();
CustomerBean cc = (CustomerBean) pi.getContextInstance().getVariable("cust");
But that does not seem like the SEAM way of doing things.
WHAT DOES NOT WORK:
1) If I extract the code that calls @CreateProcess to a separate method the jbpm process "acts" like a async process and needs a signal to start
public String logmein()
{
createSyncProcess();
}
@CreateProcess(definition="asyncProcess")
private createSyncProcess() {
}
In this case the pageflow continues, old values are shown on the page and process never kicksoff!
Any info would be appreciated.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970186#3970186
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970186
19 years, 7 months