Topic
  • 12 replies
  • Latest Post - ‏2010-06-10T09:51:02Z by SystemAdmin
SystemAdmin
SystemAdmin
938 Posts

Pinned topic Composite Transaction

‏2010-05-10T13:23:25Z | mdm-migration
Hi,

I had encountered an error during testing a composite transaction.

My service ,I named it like "createCustomerComposite".

For registering the transaction in the database I inserted the same to CDBUSINESSTXTP table.

IN DWLCommon_Extension.properties I mapped the service to my BP

BusinessProxy.tcrm.createCustomerComposite=com.mypack.compositetxns.CreateCustomerBP

Here is my input XML which was working fine earlier when the transaction was addContract instead of createCustomerComposite.

My Input XML :

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TCRMService SYSTEM "myTCRM.dtd">
<TCRMService>
<RequestControl>
<requestID>22222</requestID>
<DWLControl>
<requesterName>cusadmin</requesterName>
<requesterLanguage>100</requesterLanguage>
</DWLControl>
</RequestControl>
<TCRMTx>
<TCRMTxType>createCustomerComposite</TCRMTxType>
<TCRMTxObject>TCRMContractBObj</TCRMTxObject>
<TCRMObject>
<TCRMContractBObj>

<LineOfBusiness>Card Account</LineOfBusiness>
<CurrencyType>1</CurrencyType>
<IssueLocation>1642</IssueLocation>
<SignedDate>2008-08-12 00:00:00</SignedDate>

<TCRMExtension>(The extension I had made.)
<ExtendedObject>XContractBObjExt</ExtendedObject>
<XContractBObjExt>
<XCardNbr>7777777</XCardNbr>
<XContractLastUpdateDate></XContractLastUpdateDate>
<XContractLastUpdateUser></XContractLastUpdateUser>
<XContractLastUpdateTxId></XContractLastUpdateTxId>
</XContractBObjExt>
</TCRMExtension>
</TCRMContractBObj>
</TCRMObject>
</TCRMTx>
</TCRMService>

My Output XML :

ut.begin()
before call the DWLServiceController
Exception:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE TCRMService SYSTEM "tCRMResponse.dtd">
<TCRMService>
<ResponseControl>
<ResultCode>FATAL</ResultCode>
<ServiceTime>47</ServiceTime>
<DWLControl>
<requesterLanguage>100</requesterLanguage>
<requesterLocale>en</requesterLocale>
<requesterName>cusadmin</requesterName>
<requestID>22222</requestID>
</DWLControl>
</ResponseControl>
<TxResponse>
<RequestType>createCustomerComposite</RequestType>
<TxResult>
<ResultCode>FATAL</ResultCode>
<DWLError>
<ComponentType>108</ComponentType>
<ErrorMessage>BTM ITxRxException occurred in Request and Response Framework.</ErrorMessage>
<ErrorType>READERR</ErrorType>
<LanguageCode>100</LanguageCode>
<ReasonCode>4930</ReasonCode>
<Severity>0</Severity>
<Throwable>com.dwl.base.exception.DWLBaseException: com.mypack.compositetxns.CreateCustomerBP</Throwable>
</DWLError>
</TxResult>
</TxResponse>
</TCRMService>
before ut.rollback()
after ut.rollback()

There is no clue available in the Sysout & Syserr logs of WAS.Also in developers guide they specified like 2 ways of deploying
1)creating BP as a EJB project(this is the one I did)
2)Normal java project & deploying .jar.

Developer guide :In addition, add a reference to this .jar file in the manifest file of the BTMEJBsForCustomer.jar.How to accomplish it?.Do we have to unjar BTMEJBs edit the Classpath : property in manifest & rejar & replace it in MDM is this the way?
Can any one elaborate on the second method.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-10T14:28:59Z  
    Hi,

    MDM Workbench v9.0 supports generating skeleton code for business proxies. I believe what we do is generate the BP code within a Java utility module which is included in the MDM application, and add a dependency on that new utility JAR to the manifest.mf of DWLCommonServicesEJB.

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-10T15:55:41Z  
    Hi,

    MDM Workbench v9.0 supports generating skeleton code for business proxies. I believe what we do is generate the BP code within a Java utility module which is included in the MDM application, and add a dependency on that new utility JAR to the manifest.mf of DWLCommonServicesEJB.

    Hope that helps, Catherine.
    Hi Catherine,

    Good to know that MDM Workbench v9.0 supports generating skeleton code.I created an EJB project for the new BusinessProxy so that it automatically gets deployed in MDM ear.COuld you please tell me which all jars I need to keep in the build path of the BP ejb project I had created & also the reason for the following error.

    Hi,

    A small update to the status of the error.

    Currently I am getting the following error.Earlier I forgot to insert entry into the COMPONENTTYPE table.Now that is also done.On executing..

    5/10/10 21:10:16:225 IST 00000013 SystemOut O ServiceLocator.getService():java.lang.ClassNotFoundException: com.dwl.unifi.tx.manager.CTxRxFacade
    at com.dwl.unifi.tx.adapter.CBaseAdapter.getSecurityToken(CBaseAdapter.java:190)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.DWLServiceControllerBase.processRequest(DWLServiceControllerBase.java:191)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans.DWLServiceControllerBean.processRequest(DWLServiceControllerBean.java:136)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans.EJSRemoteStatelessDWLServiceController_2ecdcec0.processRequest(EJSRemoteStatelessDWLServiceController_2ecdcec0.java:29)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.processRequest(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:166)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie._invoke(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:106)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

    The class actually belongs to BTMEJBs but even after including that jar to the class path I am getting the same.

    Regards
    Nikkie
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-11T14:19:59Z  
    Hi Catherine,

    Good to know that MDM Workbench v9.0 supports generating skeleton code.I created an EJB project for the new BusinessProxy so that it automatically gets deployed in MDM ear.COuld you please tell me which all jars I need to keep in the build path of the BP ejb project I had created & also the reason for the following error.

    Hi,

    A small update to the status of the error.

    Currently I am getting the following error.Earlier I forgot to insert entry into the COMPONENTTYPE table.Now that is also done.On executing..

    5/10/10 21:10:16:225 IST 00000013 SystemOut O ServiceLocator.getService():java.lang.ClassNotFoundException: com.dwl.unifi.tx.manager.CTxRxFacade
    at com.dwl.unifi.tx.adapter.CBaseAdapter.getSecurityToken(CBaseAdapter.java:190)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.DWLServiceControllerBase.processRequest(DWLServiceControllerBase.java:191)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans.DWLServiceControllerBean.processRequest(DWLServiceControllerBean.java:136)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans.EJSRemoteStatelessDWLServiceController_2ecdcec0.processRequest(EJSRemoteStatelessDWLServiceController_2ecdcec0.java:29)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.processRequest(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:166)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.dwl.base.requestHandler.beans._EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie._invoke(_EJSRemoteStatelessDWLServiceController_2ecdcec0_Tie.java:106)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatchInvokeHandler(ServerDelegate.java:613)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ServerDelegate.dispatch(ServerDelegate.java:466)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.ORB.process(ORB.java:503)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.CORBA.iiop.ORB.process(ORB.java:1552)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.Connection.respondTo(Connection.java:2673)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.Connection.doWork(Connection.java:2551)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.rmi.iiop.WorkUnitImpl.doWork(WorkUnitImpl.java:62)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.ejs.oa.pool.PooledThread.run(ThreadPool.java:95)
    5/10/10 21:10:16:225 IST 00000013 SystemErr R at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1510)

    The class actually belongs to BTMEJBs but even after including that jar to the class path I am getting the same.

    Regards
    Nikkie
    Hi,

    For a typical project that includes a business proxy, the jars in the classpath (defined in the manifest.mf) are:

    CoreUtilities.jar ManagementCommon.jar CommonUtilities.jar Logging.jar ConfigurationRepository.jar ConfigurationClient.jar DWLCommonServices.jar icu4j.jar BTM.jar Services.jar Base.jar

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-18T13:59:35Z  
    I also got same issue. The exception says the property(composite service name) is missing. But i have added it in DWLcommon_extension.properties file as mentioned in the DevelopersGuid doc.Please see the exception below.
    <TxResponse>
    <RequestType>compositeSearchContract</RequestType>
    <TxResult>
    <ResultCode>FATAL</ResultCode>
    <DWLError>
    <ComponentType>108</ComponentType>
    <ErrorMessage>BTM ITxRxException occurred in Request and Response Framework.</ErrorMessage>
    <ErrorType>READERR</ErrorType>
    <LanguageCode>100</LanguageCode>
    <ReasonCode>4930</ReasonCode>
    <Severity>0</Severity>
    <Throwable>com.dwl.base.exception.DWLBaseException: Exception_DWLTxnBP_Exception: The request cannot be processed by the application. Additional error message = Exception_Shared_NoProperty: The property is not defined in the properties file. Property = compositeSearchContract</Throwable>
    </DWLError>
    </TxResult>
    </TxResponse>

    Hi Catherine/ Prashantha,
    Could you be able to detail the procedure for creating a custom BP if time permits? thanks in advance.

    Sunil
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-18T14:22:31Z  
    I also got same issue. The exception says the property(composite service name) is missing. But i have added it in DWLcommon_extension.properties file as mentioned in the DevelopersGuid doc.Please see the exception below.
    <TxResponse>
    <RequestType>compositeSearchContract</RequestType>
    <TxResult>
    <ResultCode>FATAL</ResultCode>
    <DWLError>
    <ComponentType>108</ComponentType>
    <ErrorMessage>BTM ITxRxException occurred in Request and Response Framework.</ErrorMessage>
    <ErrorType>READERR</ErrorType>
    <LanguageCode>100</LanguageCode>
    <ReasonCode>4930</ReasonCode>
    <Severity>0</Severity>
    <Throwable>com.dwl.base.exception.DWLBaseException: Exception_DWLTxnBP_Exception: The request cannot be processed by the application. Additional error message = Exception_Shared_NoProperty: The property is not defined in the properties file. Property = compositeSearchContract</Throwable>
    </DWLError>
    </TxResult>
    </TxResponse>

    Hi Catherine/ Prashantha,
    Could you be able to detail the procedure for creating a custom BP if time permits? thanks in advance.

    Sunil
    Hi,

    If you have defined the property correctly in DWLCommon_extension.properties, and the server has been restarted, then check that the server is looking at the correct properties files.

    In a development environment, the server classpath is set up to point to CustomerResources/properties in your workspace so the server will pick up your changes to the properties files. If the server does not seem to be seeing your property changes it is worth checking that the server classpath is correct.

    Go in to the WAS admin console, select the server, on the right hand side of the panel find Java and Process Management - Process Definition. On the next page, select Java Virtual Machine. You can edit the classpath if it is not correct.

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-19T02:34:37Z  
    Hi,

    If you have defined the property correctly in DWLCommon_extension.properties, and the server has been restarted, then check that the server is looking at the correct properties files.

    In a development environment, the server classpath is set up to point to CustomerResources/properties in your workspace so the server will pick up your changes to the properties files. If the server does not seem to be seeing your property changes it is worth checking that the server classpath is correct.

    Go in to the WAS admin console, select the server, on the right hand side of the panel find Java and Process Management - Process Definition. On the next page, select Java Virtual Machine. You can edit the classpath if it is not correct.

    Hope that helps, Catherine.
    Hi Catherine,
    Thanks for the reply. I have verified the class path as you have mentioned and it is correct. It was working fine before as well , otherwise my extension would nt have worked properly. I will explain the steps i have done for creating the BP. Please correct me if there is something wrong.

    1. I have created a Java project and created class extending the DWLTXnBP
    2. Overriden the execute method
    3. added following entry in DWLCommon_extension.properties
    BusinessProxy.tcrm.compositeSearchContract = com.XXXXX.mdm.CompositeSearch
    4. registered the transaction name in CDBUSINESSTXTP table
    5.Given dependency to my project jar in MDM.EAR
    6.Added reference in Manifest of DWLCommonServiceEJB as you have mentioned in previous post
    7. restarted the server and run the transaction through XML Tester.

    Am I missing any steps?

    Sunil
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-19T09:12:38Z  
    Hi Catherine,
    Thanks for the reply. I have verified the class path as you have mentioned and it is correct. It was working fine before as well , otherwise my extension would nt have worked properly. I will explain the steps i have done for creating the BP. Please correct me if there is something wrong.

    1. I have created a Java project and created class extending the DWLTXnBP
    2. Overriden the execute method
    3. added following entry in DWLCommon_extension.properties
    BusinessProxy.tcrm.compositeSearchContract = com.XXXXX.mdm.CompositeSearch
    4. registered the transaction name in CDBUSINESSTXTP table
    5.Given dependency to my project jar in MDM.EAR
    6.Added reference in Manifest of DWLCommonServiceEJB as you have mentioned in previous post
    7. restarted the server and run the transaction through XML Tester.

    Am I missing any steps?

    Sunil
    Hi Sunil,

    That seems fine to me, should work - in fact I think your business proxy is being called correctly, and the problem is with it's implementation.

    The base business proxy uses properties to determine which controller class implements a transaction. These properties are of the form: transaction-name = controller-class-name

    So check that in your business proxy class you have overridden the method:-

    public Object execute( Object )

    and are not calling super.execute

    and are not calling processSearchObject with the wrong transaction name.

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-19T09:23:15Z  
    Hi Sunil,

    That seems fine to me, should work - in fact I think your business proxy is being called correctly, and the problem is with it's implementation.

    The base business proxy uses properties to determine which controller class implements a transaction. These properties are of the form: transaction-name = controller-class-name

    So check that in your business proxy class you have overridden the method:-

    public Object execute( Object )

    and are not calling super.execute

    and are not calling processSearchObject with the wrong transaction name.

    Hope that helps, Catherine.
    Hi Catherine,
    Thanks a lot for your prompt support. I really appreciate the effort you are taking to help beginners like me. I could sort out the issues and the steps I have done were correct. I didnt implement the BP, just made the skeleton by overriding the execute method. It was making the issue. Now I am able to debug as well :) . Debugger is catching the break points in my BP.I have created another thread for searching based on extended attribute. If i want to write the SQL in my BP, which BObj should I Pass in the input XML? TCRMContractSearchBObj should be extended to include the new attribute?

    Thanks
    Sunil
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-05-25T09:05:00Z  
    Hi Catherine,
    Thanks a lot for your prompt support. I really appreciate the effort you are taking to help beginners like me. I could sort out the issues and the steps I have done were correct. I didnt implement the BP, just made the skeleton by overriding the execute method. It was making the issue. Now I am able to debug as well :) . Debugger is catching the break points in my BP.I have created another thread for searching based on extended attribute. If i want to write the SQL in my BP, which BObj should I Pass in the input XML? TCRMContractSearchBObj should be extended to include the new attribute?

    Thanks
    Sunil
    Hi,

    There is no single correct way to implement the business proxy - it depends on your requirements.

    I don't think the MDM Workbench supports creating a data extension of TCRMContractSearchBObj, although you can do so manually if required. Or you could create a new BObj as the request object. Either approach will work, it depends what you want the request XML to look like.

    Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-06-08T11:39:07Z  
    Hi,

    There is no single correct way to implement the business proxy - it depends on your requirements.

    I don't think the MDM Workbench supports creating a data extension of TCRMContractSearchBObj, although you can do so manually if required. Or you could create a new BObj as the request object. Either approach will work, it depends what you want the request XML to look like.

    Catherine.
    Hi Catherine,
    What are the steps need to be done if I want to make a custom business object as input to my composite transaction?
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-06-08T14:32:29Z  
    Hi Catherine,
    What are the steps need to be done if I want to make a custom business object as input to my composite transaction?
    Hi,

    The simplest way is to use the MDM Workbench - define a new entity with whatever content you need in your request BObj. The workbench (any version before 9.0) will assume this new entity is going to be persisted to the database, so a lot of the generated code may not be relevant - but you can just ignore it. If it matters to you, you could customize the generated code and cut out the persistence code.

    To use the new entity with your business proxy, just pass it in as the request object in your XML request - the BObj will be instantiated and passed through to the business proxy.

    Hope that helps, Catherine.
  • SystemAdmin
    SystemAdmin
    938 Posts

    Re: Composite Transaction

    ‏2010-06-10T09:51:02Z  
    Thanks for the replies & support.