Yes, exceptions from the data portal always come back as DataPortalException, with the original exception available through the BusinessException property.
And yes, any code running on the application server can call normal object factory methods and it should work fine. Your config file on the server won't have configured the data portal to be remote, so it will run locally, within the already established context of your server-side code.
hi,
Thanks for the reply. One more question.
Would using command objects be an appropriate implementation of trying to implement business processes? Also what if I need some transactional support, say for instance if the process is calling components that update or insert data, but possibly mixed with others that do not need such support, such as processing a credit card, for example.
I figured I could just have the Execute method return whatever type of return I need, such as a boolean to see if it executed successfully, or even a business object of some kind.
----- Original Message -----From: Rockford LhotkaSent: Sunday, June 25, 2006 4:23 PMSubject: RE: [CSLA .NET] Command objectsAs with any transaction scheme, you need to be careful about when you start/stop the transaction.If you decorate DataPortal_Execute() with the Transaction attribute, everything inside will be transactionally protected as you specify. If you want to mix transactional and non-transactional operations you need to start/end the transaction at a lower level. Of course that's the least of your worries, since you need to manually determine how to handle failure and "rollback" of the non-transactional portion of your process - and that can be really complex...Rocky
From: Brandon [mailto:cslanet@lhotka.net]
Sent: Sunday, June 25, 2006 4:38 PM
To: rocky@lhotka.net
Subject: Re: [CSLA .NET] Command objectshi,If I decorate DataPortal_Execute with Transactional, would every method it refers to in any object have to be decorated with the same?Thanks,Brandon
Copyright (c) Marimer LLC