[JBoss Seam] - Re: Hibernate and regular JSF validation and EntityHome prob
by hstang
"gavin.king(a)jboss.com" wrote : How many times does ManagedPersistenceContext.initEntityManager() get called?
|
| How many times does Home.setInstance() get called?
|
| Put breakpoints.
For both questions, once.
OK, I'm exhausted after trying to trace through at the end of the day...BUT here's my finding:
I traced down to handleTransactionsAfterPhase() in SeamPhaseListener.java, line 312.
| public void handleTransactionsAfterPhasel(PhaseEvent event)
| {
| if ( Init.instance().isTransactionManagementEnabled() )
| {
| log.info("handleTransactionsAfterPhase committing here**************");
| PhaseId phaseId = event.getPhaseId();
| boolean commitTran = phaseId==PhaseId.INVOKE_APPLICATION ||
| event.getFacesContext().getRenderResponse() || //TODO: no need to commit the tx if we failed to restore the view
| event.getFacesContext().getResponseComplete() ||
| ( phaseId==PhaseId.RENDER_RESPONSE && !Init.instance().isClientSideConversations() );
|
| if (commitTran)
| {
| commitOrRollback(phaseId); //we commit before destroying contexts, cos the contexts have the PC in them
| }
| }
| }
|
This code suggests to commit/rollback transaction if validation fails, since you are checking if event.getFacesContext().getRenderResponse(). This is the same check you use in org.jboss.seam.core.Validation in afterProcessValidations. Correct me if I'm wrong.
Could this be why my managed property is set to false, and the em could not find the instance anymore?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055425#4055425
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055425
18Â years, 10Â months
[JBossWS] - UnmarshallException for xsd type any
by meghanai_99
Hello,
I am publishing BPEL processes on JBoss 4.0.5GA, JBossWS 1.2.1 and JBPM 3.2
My xsd defines a certain type as shown below -
<xs:complexType name="CredentialsType">
| <xs:sequence>
| <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
| </xs:sequence>
| <xs:anyAttribute/>
| </xs:complexType>
The request message contains wsse:security element as child of 'CredentialsType'. However when the SOAP message is received, I get following exception -
org.jboss.ws.WSException: org.jboss.ws.core.jaxrpc.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.Un
| marshalException: Failed to parse source: Failed to find read method or field for property 'security' in class com.seren
| a.bpel.CredentialsType
| at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:248)
| at org.jboss.ws.core.soap.XMLContent.transitionTo(XMLContent.java:95)
| at org.jboss.ws.core.soap.DOMContent.transitionTo(DOMContent.java:77)
| at org.jboss.ws.core.soap.SOAPContentElement.transitionTo(SOAPContentElement.java:140)
| at org.jboss.ws.core.soap.SOAPContentElement.getObjectValue(SOAPContentElement.java:171)
| at org.jboss.ws.core.EndpointInvocation.transformPayloadValue(EndpointInvocation.java:243)
| at org.jboss.ws.core.EndpointInvocation.getRequestParamValue(EndpointInvocation.java:111)
| at org.jboss.ws.core.EndpointInvocation.getRequestPayload(EndpointInvocation.java:126)
| at org.jboss.ws.core.server.ServiceEndpointInvokerJSE.invokeServiceEndpointInstance(ServiceEndpointInvokerJSE.ja
| va:103)
| at org.jboss.ws.core.server.AbstractServiceEndpointInvoker.invoke(AbstractServiceEndpointInvoker.java:207)
| at org.jboss.ws.core.server.ServiceEndpoint.processRequest(ServiceEndpoint.java:212)
| at org.jboss.ws.core.server.ServiceEndpointManager.processRequest(ServiceEndpointManager.java:448)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| Caused by: org.jboss.ws.core.jaxrpc.binding.BindingException: org.jboss.ws.core.jaxrpc.binding.jbossxb.UnmarshalExceptio
| n: Failed to parse source: Failed to find read method or field for property 'security' in class com.serena.bpel.Credenti
| alsType
| at org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:108)
| at org.jboss.ws.core.jaxrpc.binding.JBossXBDeserializer.deserialize(JBossXBDeserializer.java:59)
| at org.jboss.ws.core.jaxrpc.binding.DeserializerSupport.deserialize(DeserializerSupport.java:59)
| at org.jboss.ws.core.soap.XMLContent.unmarshallObjectContents(XMLContent.java:178)
| ... 34 more
The auto-generated CredentialsType class is as follows -
public class CredentialsType
| {
|
| protected javax.xml.soap.SOAPElement[] _any;
| public CredentialsType(){}
|
| public CredentialsType(javax.xml.soap.SOAPElement[] _any){
| this._any=_any;
| }
| public javax.xml.soap.SOAPElement[] get_any() { return _any ;}
|
| public void set_any(javax.xml.soap.SOAPElement[] _any){ this._any=_any; }
|
| }
Can someone tell me how I can get this working? Let me know if I should provide more information.
Thank you,
Meghana
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4055422#4055422
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4055422
18Â years, 10Â months