Using the database table adapter  Entering user-specific values in Web Studio

Chapter 7: Personalizing Portlet Content

Using the EJB adapter

If a postal code is something you want to use more widely than just inside the portal, the EJB adapter may be a better place to maintain the information.

Imagine that your payroll processing system runs a batch job (outside the portal) to automatically print and mail paychecks to all employees every two weeks. The part of that payroll application that prints the address needs to look up the employee’s address, including the postal code. It would be difficult to write the payroll application to use the postal code information from the Database adapter.

However, you could write such an application using the SybPersonalization EJBs:

InitialContext ctx = new InitialContext();
Personalization pers = (Personalization)
   ctx.lookup("SybPersonalization/Personalization");
Item[] zipcode = pers.getItems("pqui", "Zipcode");




Copyright © 2004. Sybase Inc. All rights reserved. Entering user-specific values in Web Studio

View this book as PDF