|
|||||||||
| Home >> All >> de >> danet >> an >> staffmgmt >> [ userprefs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
de.danet.an.staffmgmt.userprefs
Class StaffMgmtUserPrefsServiceFactory

java.lang.Objectde.danet.an.util.userprefs.UserPrefsServiceFactory
de.danet.an.staffmgmt.userprefs.StaffMgmtUserPrefsServiceFactory
- public class StaffMgmtUserPrefsServiceFactory
- extends de.danet.an.util.userprefs.UserPrefsServiceFactory
Implements a user preferences service factory based on the staffmgmt package.
Usage of this class as service factory requires an additional configuration parameter. The service factory implementation needs to connect to the staff directory EJB. In order to do so, it needs a JNDI name to look up the home interface. As JNDI names must be changeable by the application deployer, the name can't be hard coded.
This factory therefore uses the following ordered lookup procedure to determine the JNDI name of the staff directory EJB home interface:
- Look for a name in
java:comp/env/de.danet.an.staffmgmt.userprefs.staffDirectory. The complete configuration forStaffMgmtUserPrefsServiceFactoryas user preferences service thus looks like:<env-entry> <description>Configure the user prefs factory</description> <env-entry-name>de.danet.an.util.UserPrefsServiceFactory</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>de.danet.an.staffmgmt.StaffMgmtUserPrefsServiceFactory</env-entry-value> </env-entry> <env-entry> <description>Configure the chosen factory</description> <env-entry-name>de.danet.an.staffmgmt.userprefs.StaffDirectory</env-entry-name> <env-entry-type>java.lang.String</env-entry-type> <env-entry-value>JNDI name of StaffDirectory EJB home</env-entry-value> </env-entry>
Note that these environment entries must be inserted in theejb-jar.xmlorweb.xmlfor every EJB resp. servlet that calls the newInstance>newInstance55 method ofUserPrefsServiceFactory. - Find the application resource file
de.danet.an.staffmgmt-userprefs.propertiesand look for an entry "staffDirectory = JNDI name of StaffDirectory EJB home". - Use the fallback JNDI name
de.danet.an.staffmgmt.StaffDirectory.
| Field Summary | |
private static java.lang.String |
homeName
The home interface name of the staff management service. |
private static org.apache.commons.logging.Log |
logger
|
private de.danet.an.staffmgmt.domain.StaffDirectory |
sd
The staff directory passed to service instances. |
| Fields inherited from class de.danet.an.util.userprefs.UserPrefsServiceFactory |
|
| Constructor Summary | |
StaffMgmtUserPrefsServiceFactory()
Constructor, called by the newInstance> newInstance 55 method of
UserPrefsServiceFactory. |
|
| Method Summary | |
private static java.lang.String |
findHomeName()
Tries to find the name of the staff management service home interface as described for the class. |
de.danet.an.util.userprefs.UserPrefsService |
newUserPrefsService(java.lang.String userId,
java.util.Properties props)
Creates a new instance of a UserPrefsService> UserPrefsService for a specific user. |
| Methods inherited from class de.danet.an.util.userprefs.UserPrefsServiceFactory |
newInstance, newUserPrefsService |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
logger
private static final org.apache.commons.logging.Log logger
sd
private de.danet.an.staffmgmt.domain.StaffDirectory sd
- The staff directory passed to service instances.
homeName
private static java.lang.String homeName
- The home interface name of the staff management service.
| Constructor Detail |
StaffMgmtUserPrefsServiceFactory
public StaffMgmtUserPrefsServiceFactory()
throws de.danet.an.util.userprefs.FactoryConfigurationError
- Constructor, called by the
newInstance>
newInstance55 method ofUserPrefsServiceFactory.
| Method Detail |
findHomeName
private static java.lang.String findHomeName()
- Tries to find the name of the staff management service home interface
as described for the class.
newUserPrefsService
public de.danet.an.util.userprefs.UserPrefsService newUserPrefsService(java.lang.String userId, java.util.Properties props) throws de.danet.an.util.userprefs.ServiceUnavailableException
- Creates a new instance of a UserPrefsService>
UserPrefsServicefor a specific user.
|
|||||||||
| Home >> All >> de >> danet >> an >> staffmgmt >> [ userprefs overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC