If you call an action or request a server-side object, you should know the name of the action or the object. Usually this isn't a big problem because it's your application and you know everything about it. But it's different if you use pre-defined application frames like ProjX.

The application frame has some prerequisites, e.g., the menu will be created after authentication. The application frame does the following call:

AbstractConnection con = getConnection();
 
Object[] oResult = con.call(new String[] {"workScreenAccess", 
                                          "workScreenAccess", 
                                          "workScreenAccess"},
                            new String[] {"getAvailableWorkScreens", 
                                          "getAvailableRoles", 
                                          "getAvailableMetaData"});

This means that you have the following in your Session LCO:

public IWorkScreenAccess getWorkScreenAccess() throws Exception
{
    IWorkScreenAccess wsac = (IWorkScreenAccess)get("workScreenAccess");
 
    if (wsac == null)
    {
        wsac = new DBWorkScreenAccess();
        ((DBWorkScreenAccess)wsac).setDBDataSource(getDBAccess());
 
        put("workScreenAccess", wsac);
    }
 
    return wsac;
}

The application frame won't work if the method name isn't getWorkScreenAccess. If you have a specific naming schema and won't use the same method name, you could do the following:

@Replacement(name="workScreenAccess")
public IWorkScreenAccess getWSAccess() throws Exception
{
   ...
}

The Replacement annotation maps the custom method to the expected name. This annotation can be used for object and action names:

@Replacement(name="sendCustomerEmail")
public void notifyCustomer() throws Exception
{
   ...
}

The Replacement will work for LCO names as well:

@Replacement(name = "Public")
public class ExternalSession extends GenericBean 
{
}

The LCO can be used with the original name or the Replacement. Both names will work.