Set default Databasket for SalesPoints
Description:
This is required if processes executed on a SalesPoint are to run in a specific transactional context.
The specified DataBasket will be attached to every process running on the SalesPoint and will determine
its transactional context. By default, no DataBasket is attached to a SalesPoint so that processes run
outside any transactional context.
Used classes:
Related topics:
ToDo:
This can be achieved in several ways. In any case, you need to attach the DataBasket to the
SalesPoint:
-
a. Open the designated
Shop
class.
b. Override theprotected void onSalesPointAdded()
method according to your needs. -
a. Open the designated
SalesPoint
class.
b. Attach theDataBasket
in it's constructor.
Example Source Code:
1 a public class ArchitectureShop extends Shop { . . . 1 b protected void onSalesPointAdded(SalesPoint sp) { super.onSalesPointAdded(sp); sp.attach(new DataBasketImpl()); } }
2 a public class ArchitectureSalesPoint extends SalesPoint { . . . 2 b public ArchitectureSalesPoint(String sPointName, DataBasket db) { super(sPointName); attach(db); } }
Back to:
Application Architecture: Persistence | Data Management: Catalog |