ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_PUBLICWEBADMIN); ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_PUBLICWEBUSER,""); ugdl.addAccessRule("/",AccessRule.RULE_DECLINE,true);  ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_CACOMMANDLINEADMIN); ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_CACOMMANDLINEADMIN,""); ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);  ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_RACOMMANDLINEADMIN); ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_RACOMMANDLINEADMIN,""); ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);  ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_BATCHCOMMANDLINEADMIN); ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_BATCHCOMMANDLINEADMIN,""); ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);
    public void ejbCreate() throws CreateException {        debug(">ejbCreate()");        try{             dataSource = (String)lookup("java:comp/env/DataSource", java.lang.String.class);            debug("DataSource=" + dataSource);           availableaccessruleshome = (AvailableAccessRulesDataLocalHome)lookup("java:comp/env/ejb/AvailableAccessRulesDataLocal");          admingrouphome = (AdminGroupDataLocalHome)lookup("java:comp/env/ejb/AdminGroupDataLocal");                     ILogSessionHome logsessionhome = (ILogSessionHome) lookup("java:comp/env/ejb/LogSession",ILogSessionHome.class);                  logsession = logsessionhome.create();        }catch(Exception e){           throw new CreateException(e.getMessage());           }        // Check if admingroup table is empty, if so insert default superuser.       try{         Collection result = admingrouphome.findAll();         if(result.size()==0){          // Authorization table is empty, fill with default and special admingroups.           AdminGroupDataLocal ugdl = admingrouphome.create("Default");           ugdl.addAdminEntity(AdminEntity.WITH_COMMONNAME,AdminEntity.TYPE_EQUALCASEINS,"Walter");           ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);                      ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_PUBLICWEBADMIN);           ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_PUBLICWEBUSER,"");           ugdl.addAccessRule("/",AccessRule.RULE_DECLINE,true);   // Temporate                      ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_CACOMMANDLINEADMIN);           ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_CACOMMANDLINEADMIN,"");           ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);                                ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_RACOMMANDLINEADMIN);           ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_RACOMMANDLINEADMIN,"");           ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);                       ugdl = admingrouphome.create(AdminGroup.SPECIALADMINGROUP_BATCHCOMMANDLINEADMIN);           ugdl.addAdminEntity(0,AdminEntity.SPECIALADMIN_BATCHCOMMANDLINEADMIN,"");           ugdl.addAccessRule("/",AccessRule.RULE_ACCEPT,true);                                }       }catch(FinderException e){       }catch(CreateException e){           throw new EJBException(e.getMessage());                    }                              debug("<ejbCreate()");    }