[jboss-svn-commits] JBL Code SVN: r5308 - in labs/jbosslabs/trunk/portal-extensions: forge-common/src/java/org/jboss/forge/common/service forge-service/src/java/org/jboss/forge/service
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Thu Jul 27 10:03:02 EDT 2006
Author: adamw
Date: 2006-07-27 10:02:59 -0400 (Thu, 27 Jul 2006)
New Revision: 5308
Removed:
labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimer.java
labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimerLocal.java
Modified:
labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/service/ForgeManagement.java
labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeService.java
Log:
Missing commit
Modified: labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/service/ForgeManagement.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/service/ForgeManagement.java 2006-07-27 13:31:10 UTC (rev 5307)
+++ labs/jbosslabs/trunk/portal-extensions/forge-common/src/java/org/jboss/forge/common/service/ForgeManagement.java 2006-07-27 14:02:59 UTC (rev 5308)
@@ -27,7 +27,7 @@
* @author adamw
* Forge management - cache and update functions.
*/
-public interface ForgeManagement extends AdministratedService {
+public interface ForgeManagement extends AdministratedService<Object> {
/**
* Adds the given value to the given cache node.
* @param portalName Name of the portal to which this value is
Modified: labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeService.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeService.java 2006-07-27 13:31:10 UTC (rev 5307)
+++ labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeService.java 2006-07-27 14:02:59 UTC (rev 5308)
@@ -36,6 +36,7 @@
import org.jboss.shotoku.tools.Constants;
import org.jboss.shotoku.service.AdministratedServiceImpl;
import org.jboss.shotoku.service.AdministratedService;
+import org.jboss.shotoku.service.UpdateThreadData;
/**
* An implementation of the ForgeManagement interface.
@@ -45,7 +46,8 @@
@Local(ForgeServiceLocal.class)
@Management(ForgeServiceManagement.class)
@Depends(Constants.SHOTOKU_SERVICE_NAME)
-public class ForgeService extends AdministratedServiceImpl implements ForgeServiceLocal,
+public class ForgeService extends AdministratedServiceImpl<Object>
+ implements ForgeServiceLocal,
ForgeServiceManagement {
private Map<CacheKey, Object> cache;
private Map<CacheKey, NodeWatcher> nodeWatchers;
@@ -116,7 +118,7 @@
/* (non-Javadoc)
* @see org.jboss.forge.common.service.ForgeManagement#update()
*/
- public synchronized void update() {
+ public synchronized void update(UpdateThreadData<Object> data) {
try {
synchronized (nodeWatchers) {
// Updating nodes.
Deleted: labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimer.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimer.java 2006-07-27 13:31:10 UTC (rev 5307)
+++ labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimer.java 2006-07-27 14:02:59 UTC (rev 5308)
@@ -1,69 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.forge.service;
-
-import javax.annotation.Resource;
-import javax.ejb.Local;
-import javax.ejb.SessionContext;
-import javax.ejb.Stateless;
-import javax.ejb.Timeout;
-import javax.ejb.Timer;
-import javax.management.MalformedObjectNameException;
-
-import org.jboss.forge.common.ForgeHelper;
-import org.jboss.forge.common.service.ForgeManagement;
-import org.jboss.mx.util.MBeanProxyExt;
-import org.jboss.mx.util.MBeanServerLocator;
-
-/**
- * A timer which, when expires, calls the update method of an instance of
- * ForgeManagement - this instance is looked up as an mbean.
- * @author adamw
- * @deprecated
- */
- at Stateless
- at Local(ForgeTimerLocal.class)
-public class ForgeTimer implements ForgeTimerLocal {
- private @Resource SessionContext ctx;
- private ForgeManagement fm;
-
- public void scheduleTimer(long interval) {
- // ctx.getTimerService().createTimer(new Date(new Date().getTime() + interval), null);
- ctx.getTimerService().createTimer(interval, interval, null);
- }
-
- @Timeout
- public void timeoutHandler(Timer timer) {
- if (fm == null) {
- try {
- fm = ((ForgeManagement) MBeanProxyExt.create(
- ForgeManagement.class,
- ForgeHelper.FORGE_SERVICE_NAME,
- MBeanServerLocator.locate()));
- } catch (MalformedObjectNameException e) {
- e.printStackTrace();
- }
- }
-
- fm.update();
- }
-}
Deleted: labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimerLocal.java
===================================================================
--- labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimerLocal.java 2006-07-27 13:31:10 UTC (rev 5307)
+++ labs/jbosslabs/trunk/portal-extensions/forge-service/src/java/org/jboss/forge/service/ForgeTimerLocal.java 2006-07-27 14:02:59 UTC (rev 5308)
@@ -1,36 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-package org.jboss.forge.service;
-
-/**
- * @author adamw
- * @deprecated
- */
-public interface ForgeTimerLocal {
- /**
- * Schedules a timer that updates forge management to timeout after the
- * specified amount of time.
- * @param interval Amount of time after which the timer should call the
- * update method (expire).
- */
- public void scheduleTimer(long interval);
-}
More information about the jboss-svn-commits
mailing list