La présentation est en train de télécharger. S'il vous plaît, attendez

La présentation est en train de télécharger. S'il vous plaît, attendez

By Kate Soglaeva. » FormHandlers do’s » Droplets do’s » Repositories do’s 2 ATG Hints by Kate Soglaeva.

Présentations similaires


Présentation au sujet: "By Kate Soglaeva. » FormHandlers do’s » Droplets do’s » Repositories do’s 2 ATG Hints by Kate Soglaeva."— Transcription de la présentation:

1 By Kate Soglaeva

2 » FormHandlers do’s » Droplets do’s » Repositories do’s 2 ATG Hints by Kate Soglaeva

3 3

4 4

5 5 HTML JSP Droplets ServicesManagers view presenter model Form Handlers Tags Xml, json Repositories Web Services

6 6 ATG Hints by Kate Soglaeva Manager Form Handler Form Form Value Object Business Object Repositories Field Validator 1 : 1 Request Business logic v alidation logic

7 7 ATG Hints by Kate Soglaeva Form Manager Form Handler Form Field Validator Business Object Repositories Droplet

8 8 ATG Hints by Kate Soglaeva JSP Form Handler MyFormHandler.properties successURL=/… errorURL=/… MyFormHandler.java checkFormRedirect (suc cessURL, errorURL); sendLocalRedirect();

9 9 ATG Hints by Kate Soglaeva

10 10 ATG Hints by Kate Soglaeva HTML JSP Droplets ServicesManagers view presenter model Html code

11 » ParameterName instead of the strings. public class GiftlistDroplet extends DynamoServlet { static final ParameterName PROFILE = ParameterName.getParameterName("profile");... public void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pResp) throws ServletException, IOException {... Object profileObject = pReq.getObjectParameter(PROFILE);... } } 11 ATG Hints by Kate Soglaeva

12 <dsp:param name="key" param="childCategory.repositoryId"/> No description. 12 ATG Hints by Kate Soglaeva

13 13 ATG Hints by Kate Soglaeva

14 1.Go to jsp 2.Go to Cache dropletCache droplet 3.Go to productproduct 4.Refresh cache droplet page 14 ATG Hints by Kate Soglaeva

15 15 ATG Hints by Kate Soglaeva

16 RQLQueryRange 16 ATG Hints by Kate Soglaeva

17 17 ATG Hints by Kate Soglaeva

18 1.Go to stores pagestores page 2.Check codecode 3.Add sort properties 4.Add Range droplet 18 ATG Hints by Kate Soglaeva

19 19 ATG Hints by Kate Soglaeva

20 <item-descriptor name=“myHoliday" display-property="name" > 20 ATG Hints by Kate Soglaeva Noun Camel case lowercase, ‘_’

21 <property name="favouriteColours" data-type="array“ column-name="favourite_colours” component-data-type="string" /> 21 ATG Hints by Kate Soglaeva Noun Camel case lowercase, ‘_’

22 public class King extends GenericService { private RqlStatement weaponQuery; } 22 ATG Hints by Kate Soglaeva

23 # /com/kings/Arthur $class=com.kingdom.King $scope=global weaponQuery=name = ?0 23 ATG Hints by Kate Soglaeva

24 public class King extends GenericService { protected static RqlStatement weaponQuery; static { try { weaponQuery = RqlStatement.parseRqlStatement("name = ?0"); } catch (RepositoryException re) { re.printStackTrace(); } 24 ATG Hints by Kate Soglaeva

25 public String getLogin(String repositoryId, String profileType) { RepositoryItem profileItem = getProfileRepository(). getItem(getRepositoryId(), getProfileType()); String loginPropertyName = getPropertyManager().getLoginPropertyName(); String login = (String) profileItem. getPropertyValue(loginPropertyName); return login; } 25 ATG Hints by Kate Soglaeva

26 <property name=“address" item-type=“address“ cascade="update,delete" /> 26 ATG Hints by Kate Soglaeva

27 » Property in the same group is retrieve in the same select statement » Be default: property in the same group are in the same table 27 ATG Hints by Kate Soglaeva

28 Never user one primary table in more than one item descriptor Avoid derived properties Don’t use derived and transient in RQL 28 ATG Hints by Kate Soglaeva

29 29

30 30 ATG Hints by Kate Soglaeva

31 » ATG Order object must follow a specific transactional pattern to avoid ˃exceptions and deadlocks, ˃ConcurrentUpdateExceptions, ˃InvalidVersionExceptions 31 ATG Hints by Kate Soglaeva

32 TransactionLockService service = configuration.getTransactionLockFactory().getServiceInstance( profileId, ); service.acquireTransactionLock( profileId ); try { TransactionDemarcation td = new TransactionDemarcation(); td.begin( transactionManager ); boolean shouldRollback = false; try { synchronized( order ) { // do order updates orderManager.updateOrder( order ); } } catch (... e ) { shouldRollback = true; throw e; } finally { td.end( shouldRollback ); } } finally { service.releaseTransactionLock( profileId ); } 32 ATG Hints by Kate Soglaeva 1) Obtain local-lock on profile ID 2) Begin Transaction 3) Synchronize on Order 4) Modify Order 5) Call OrderManager.updateOrder 6) End Synchronization 7) End Transaction 8) Release local-lock on profile ID

33 Verify that the PageFilter in web.xml Pre-Compiling JSPs Recheck components scope Disable Performance Monitor Check loggingDebug

34 34 ATG Hints by Kate Soglaeva


Télécharger ppt "By Kate Soglaeva. » FormHandlers do’s » Droplets do’s » Repositories do’s 2 ATG Hints by Kate Soglaeva."

Présentations similaires


Annonces Google