Examples of AdminService


Examples of com.caucho.server.admin.AdminService

      broker.addStartupActor(event.getBean(), service.name(),
                             service.threadMax());
    }

    if (annotated.isAnnotationPresent(AdminService.class)) {
      AdminService service = annotated.getAnnotation(AdminService.class);

      Server server = Server.getCurrent();

      if (server == null) {
        throw new ConfigException(L
            .l("@AdminService requires an active Resin Server."));
      }

      if (!server.isWatchdog()) {
        HempBroker broker = (HempBroker) server.getAdminBroker();

        broker.addStartupActor(event.getBean(), service.name(),
                               service.threadMax());
      }
    }
  }
View Full Code Here

Examples of com.peusoft.ptcollect.core.service.persistance.AdminService

//        upa.setPrise(new BigDecimal("200.50"));
        upa.setBudget(new BigDecimal("20.00"));
        objects.add(upa);
        to_delete.add(0, upa);
        daSrv.persistChanges(objects, null, null);
        AdminService admSrv = configSrv.getAdminService();
        List<UserProjectActivity> upas = admSrv.getUserProjectActivities(user);
        assertEquals("Wrong number of user project activities: ", 1, upas.size());
        assertEquals("Wrong user project activity: ", upa, upas.get(0));
//    assertEquals("Wrong prise: ", upa.getPrise(), upas.get(0).getPrise());

        // change data
//    upa.setPrise(new BigDecimal("340.20"));
        List<AbstractDomainObject> changes = new ArrayList<AbstractDomainObject>();
        changes.add(upa);
        daSrv.persistChanges(null, changes, null);
        upas = admSrv.getUserProjectActivities(user);
        assertEquals("Wrong number of user project activities: ", 1, upas.size());
        assertEquals("Wrong user project activity: ", upa, upas.get(0));
//    assertEquals("Wrong prise: ", upa.getPrise(), upas.get(0).getPrise());

        // delete data
        daSrv.persistChanges(null, null, to_delete);
        upas = admSrv.getUserProjectActivities(user);
        assertEquals("Wrong number of user project activities: ", 0, upas.size());

        LOGGER.info("persistChanges finished");
    }
View Full Code Here

Examples of com.renren.api.client.services.AdminService

     * 初始化
     */
    private void initService() {
        this.friendsService = new FriendsService(this.renrenApiInvoker);
        this.userService = new UserService(this.renrenApiInvoker);
        this.adminService = new AdminService(this.renrenApiInvoker);
        this.invitationsService = new InvitationsService(this.renrenApiInvoker);
        this.notificationsService = new NotificationsService(this.renrenApiInvoker);
        this.pageService = new PageService(this.renrenApiInvoker);
        this.payService = new PayService(this.renrenApiInvoker);
        this.photoService = new PhotoService(this.renrenApiInvoker);
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

            } else {
                fileUrl = instanceEnvironment.getConfigFilePath();
            }
           
            if (useBackupServerXml) {
                AdminService as = AdminService.getAdminService();
                if (as != null) {
                    AdminContext ac = as.getAdminContext();
                    if (ac != null) {
                        configContext = ac.getAdminConfigContext();
                    }
                }
            }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

     */
    protected boolean loadJSR77(String appName, String j2eeType) {
  ObjectName jsr77mBeanObjectName = null;
  try {
            String domainName = null;
            AdminService adminService = AdminService.getAdminService();
            if (adminService != null) {
                domainName = adminService.getAdminContext().getDomainName();
            } else {
                return false;
            }

            if (j2eeType == null) return false;

            //We do not load JSR77 MBeans for web modules
            //web modules are loaded by the Tomcat container
            if (j2eeType.equals(ManagementObjectManager.J2EE_TYPE_WEB_MODULE)) {
                return false;
            }

            String instanceName =
                ApplicationServer.getServerContext().getInstanceName();

            //form query
            StringBuffer sb = new StringBuffer("");
            sb.append(domainName + ":");
            sb.append("j2eeType=" + j2eeType + ",");
            sb.append("name=" + appName + ",");
            if (! j2eeType.equals(ManagementObjectManager.J2EE_TYPE_APPLICATION)) {
                sb.append("J2EEApplication=null" + ",");
            }
            sb.append("J2EEServer=" + instanceName + "," + "*");

            // perform query
            MBeanServer mbs = adminService.getAdminContext().getMBeanServer();

            ObjectName objNamePattern = new ObjectName(sb.toString());
            java.util.Set s = mbs.queryNames(objNamePattern, null);
            if (s != null && s.size()>0) {
                ObjectName [] objNameArr =
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

        }
    }

    public static ConfigContext getConfigContext() {
        try {
            AdminService adminService = AdminService.getAdminService();
            if (adminService != null) {
                ConfigContext config =
                        adminService.getAdminContext().getAdminConfigContext();
                return config;
            } else {
               return null;
            }
        } catch (Exception e) {
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

    }

    public static String getDomainName()
        throws IASDeploymentException {
        try {
           AdminService adminService = AdminService.getAdminService();
            if (adminService != null) {
                String domainName =
                        adminService.getAdminContext().getDomainName();
                return domainName;
            } else {
               return null;
            }
        } catch (Exception e) {
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

     */
    public SynchronizationClientImpl(java.lang.String instanceName)
            throws SynchronizationException
    {

        AdminService aService = AdminService.getAdminService();
        if ( aService != null && aService.isDas() ) {
            try {
                jmxFileTrans = new JMXFileTransfer (InstanceRegistry.
                            getInstanceConnection(instanceName));

                // since initializing with a connection already
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

     *
     * @return true if this instance is the central administration server.
     */
    public boolean isDAS()
    {
        AdminService adminSvc = AdminService.getAdminService();
        boolean isDAS = false;
        if (adminSvc != null)
        {
            isDAS =  adminSvc.isDas();
        }
        return isDAS;
    }
View Full Code Here

Examples of com.sun.enterprise.admin.server.core.AdminService

     */
    public void setRestartRequiredForTarget(ConfigContext ctx,
            ArrayList configChangeList ) {
  
        try {
            AdminService admServ = AdminService.getAdminService();

            if ((admServ != null) && (admServ.isDas())) {
                Set nonDynSet = ElementChangeHelper.
                    getXPathesForDynamicallyNotReconfigurableElements(
                    configChangeList);

                Iterator iter = nonDynSet.iterator();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.