[jboss-cvs] jboss-cvs-commits Digest, Vol 48, Issue 123
Ales Justin
ales.justin at gmail.com
Thu Jun 10 15:44:54 EDT 2010
R
Sent from my iPod
On 10.6.2010, at 5:36, jboss-cvs-commits-request at lists.jboss.org wrote:
> Send jboss-cvs-commits mailing list submissions to
> jboss-cvs-commits at lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
> or, via email, send a message with subject or body 'help' to
> jboss-cvs-commits-request at lists.jboss.org
>
> You can reach the person managing the list at
> jboss-cvs-commits-owner at lists.jboss.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of jboss-cvs-commits digest..."
>
>
> Today's Topics:
>
> 1. JBossAS SVN: r105909 - in branches/JBPAPP_5_1:
> server/src/etc/deploy and 1 other directories.
> (jboss-cvs-commits at lists.jboss.org)
> 2. JBossAS SVN: r105910 -
> branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml.
> (jboss-cvs-commits at lists.jboss.org)
> 3. JBossAS SVN: r105911 -
> projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator.
> (jboss-cvs-commits at lists.jboss.org)
> 4. JBoss Messaging SVN: r8056 - in branches/Branch_1_4:
> tests/src/org/jboss/test/messaging/jms/server/destination
> and 1
> other directory. (jboss-cvs-commits at lists.jboss.org)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 9 Jun 2010 17:53:50 -0400
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBossAS SVN: r105909 - in branches/JBPAPP_5_1:
> server/src/etc/deploy and 1 other directories.
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> <201006092153.o59Lroxw024211 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
>
> Author: miclark
> Date: 2010-06-09 17:53:50 -0400 (Wed, 09 Jun 2010)
> New Revision: 105909
>
> Added:
> branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> PersistentIdTimerService.java
> branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> UUIDTimerIdGenerator.java
> Modified:
> branches/JBPAPP_5_1/ejb3/src/main/org/jboss/as/ejb3/timerservice/
> TimerServiceFacade.java
> branches/JBPAPP_5_1/server/src/etc/deploy/ejb2-timer-service.xml
> branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> EJBTimerServiceImpl.java
> branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> TimerServiceImpl.java
> Log:
> JBPAPP-3926 fix to allow EJBTimers to retain timer IDs over server
> restarts.
>
> Modified: branches/JBPAPP_5_1/ejb3/src/main/org/jboss/as/ejb3/
> timerservice/TimerServiceFacade.java
> ===================================================================
> --- branches/JBPAPP_5_1/ejb3/src/main/org/jboss/as/ejb3/timerservice/
> TimerServiceFacade.java 2010-06-09 21:34:27 UTC (rev 105908)
> +++ branches/JBPAPP_5_1/ejb3/src/main/org/jboss/as/ejb3/timerservice/
> TimerServiceFacade.java 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -34,16 +34,24 @@
> import javax.ejb.TimerService;
> import javax.management.ObjectName;
>
> +import org.jboss.logging.Logger;
> +
> +import org.jboss.ejb.txtimer.PersistentIdTimerService;
> +
> import org.jboss.ejb.AllowedOperationsAssociation;
>
> /**
> * Holds the association with the container, without exposing it.
> *
> * @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
> + * @author <a href=mailto:miclark at redhat.com">Mike M. Clark</a>
> + *
> * @version $Revision$
> */
> -public class TimerServiceFacade implements TimerService
> +public class TimerServiceFacade implements PersistentIdTimerService
> {
> + private static Logger log = Logger.getLogger
> (TimerServiceFacade.class);
> +
> private ObjectName objectName;
> private TimerService delegate;
>
> @@ -76,6 +84,21 @@
> assertAllowedIn("TimerService.createTimer");
> return delegate.createTimer(initialDuration, intervalDuration,
> info);
> }
> +
> + // JBPAPP-3926
> + public Timer createTimer(Date initialExpiration, long
> intervalDuration, Serializable info, String timerId) throws
> IllegalArgumentException, IllegalStateException, EJBException
> + {
> + if (delegate instanceof PersistentIdTimerService)
> + {
> + PersistentIdTimerService persistentTimerService =
> (PersistentIdTimerService) delegate;
> + return persistentTimerService.createTimer
> (initialExpiration, intervalDuration, info, timerId);
> + }
> + else
> + {
> + log.warn("Unable to preserve timerId. Will generate new
> timerId");
> + return delegate.createTimer(initialExpiration,
> intervalDuration, info);
> + }
> + }
>
> public Timer createTimer(long duration, Serializable info) throws
> IllegalArgumentException, IllegalStateException, EJBException
> {
>
> Modified: branches/JBPAPP_5_1/server/src/etc/deploy/ejb2-timer-
> service.xml
> ===================================================================
> --- branches/JBPAPP_5_1/server/src/etc/deploy/ejb2-timer-
> service.xml 2010-06-09 21:34:27 UTC (rev 105908)
> +++ branches/JBPAPP_5_1/server/src/etc/deploy/ejb2-timer-
> service.xml 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -44,7 +44,7 @@
> <!-- An EJB Timer Service that is Tx aware -->
> <mbean code="org.jboss.ejb.txtimer.EJBTimerServiceImpl"
> name="jboss.ejb:service=EJBTimerService">
> - <attribute
> name=
> "TimerIdGeneratorClassName"
> >org.jboss.ejb.txtimer.BigIntegerTimerIdGenerator</attribute>
> + <attribute
> name=
> "TimerIdGeneratorClassName"
> >org.jboss.ejb.txtimer.UUIDTimerIdGenerator</attribute>
> <attribute
> name=
> "TimedObjectInvokerClassName"
> >org.jboss.ejb.txtimer.TimedObjectInvokerImpl</attribute>
> <depends optional-attribute-
> name=
> "RetryPolicy"
> >jboss.ejb:service=EJBTimerService,retryPolicy=fixedDelay</depends>
> <depends optional-attribute-
> name=
> "PersistencePolicy"
> >jboss.ejb:service=EJBTimerService,persistencePolicy=database</
> depends>
>
> Modified: branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> EJBTimerServiceImpl.java
> ===================================================================
> --- branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> EJBTimerServiceImpl.java 2010-06-09 21:34:27 UTC (rev 105908)
> +++ branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> EJBTimerServiceImpl.java 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -477,16 +477,27 @@
> TimedObjectId targetId = handle.getTimedObjectId();
> ContainerMBean container = (ContainerMBean)
> MBeanProxyExt.create(ContainerMBean.class, containerId, server);
> TimerService timerService = container.getTimerService
> (targetId.getInstancePk());
> - timerService.createTimer(handle.getFirstTime(),
> handle.getPeriode(), handle.getInfo());
> +
> + // Fix for JBPAPP-3926
> + if (timerService instanceof PersistentIdTimerService)
> + {
> + PersistentIdTimerService persistentIdTimerService
> = (PersistentIdTimerService) timerService;
> + persistentIdTimerService.createTimer
> (handle.getFirstTime(), handle.getPeriode(), handle.getInfo(),
> handle.getTimerId());
> + }
> + else
> + {
> + log.warn("Unable to preserve timerId. Will
> generate new timerId: " + handle);
> + timerService.createTimer(handle.getFirstTime(),
> handle.getPeriode(), handle.getInfo());
> + }
> }
> catch (Exception e)
> {
> log.warn("Unable to restore timer record: " + handle,
> e);
> }
> }
> - }
> + }
> }
> -
> +
> // EJBTimerServiceImplMbean operations ---------------------------
>
> /**
>
> Added: branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> PersistentIdTimerService.java
> ===================================================================
> --- branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> PersistentIdTimerService.java (rev 0)
> +++ branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> PersistentIdTimerService.java 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -0,0 +1,47 @@
> +/*
> + * JBoss, Home of Professional Open Source.
> + * Copyright 2010, Red Hat, Inc. and individual contributors
> + * as indicated by the @author tags. See the copyright.txt file 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.ejb.txtimer;
> +
> +import java.io.Serializable;
> +
> +import java.util.Date;
> +
> +import javax.ejb.EJBException;
> +import javax.ejb.Timer;
> +import javax.ejb.TimerService;
> +
> +/**
> + * A interface to allow the specification of the timerId when
> creating
> + * a timer. This interface adds to the
> + * <code>javax.ejb.TimerService</code> interface. The additional
> + * <code>createTimer</code> method that takes the timerId as a
> parameter.
> + * <p>
> + * This class is used address JBPAPP-3926.
> + *
> + * @author <a href=mailto:miclark at redhat.com">Mike M. Clark</a>
> + * @version $Revision: $
> + */
> +public interface PersistentIdTimerService extends TimerService
> +{
> + public Timer createTimer(Date initialExpiration, long
> intervalDuration, Serializable info, String timerId)
> + throws IllegalArgumentException, IllegalStateException,
> EJBException;
> +}
>
> Modified: branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> TimerServiceImpl.java
> ===================================================================
> --- branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> TimerServiceImpl.java 2010-06-09 21:34:27 UTC (rev 105908)
> +++ branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> TimerServiceImpl.java 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -49,10 +49,11 @@
> *
> * @author Thomas.Diesler at jboss.org
> * @author Dimitris.Andreadis at jboss.org
> + * @author miclark at redhat.com
> * @version $Revision$
> * @since 07-Apr-2004
> */
> -public class TimerServiceImpl implements TimerService
> +public class TimerServiceImpl implements PersistentIdTimerService
> {
> // logging support
> private static Logger log = Logger.getLogger
> (TimerServiceImpl.class);
> @@ -235,6 +236,7 @@
> * may occur in close succession to
> "catch up".
> * @param info Application information to be
> delivered along with the txtimer expiration
> * notification. This can be null.
> + * @param timerId TimerId used for persistence of the
> timer.
> * @return The newly created Timer.
> * @throws IllegalArgumentException If initialExpiration is null,
> or initialExpiration.getTime()
> * is negative, or
> intervalDuration is negative.
> @@ -242,17 +244,18 @@
> * a state that does not allow
> access to this method.
> * @throws javax.ejb.EJBException If this method could not
> complete due to a system-level failure.
> */
> - public Timer createTimer(Date initialExpiration, long
> intervalDuration, Serializable info)
> + public Timer createTimer(Date initialExpiration, long
> intervalDuration, Serializable info, String timerId)
> throws IllegalArgumentException, IllegalStateException,
> EJBException
> {
> if (initialExpiration == null)
> throw new IllegalArgumentException("initial expiration is
> null");
> if (intervalDuration < 0)
> throw new IllegalArgumentException("interval duration is
> negative");
> + if (timerId == null)
> + throw new IllegalArgumentException("timerId is null");
>
> try
> {
> - String timerId = timerIdGenerator.nextTimerId();
> TimerImpl timer = new TimerImpl(this, timerId,
> timedObjectId, timedObjectInvoker, info);
> persistencePolicy.insertTimer(timerId, timedObjectId,
> initialExpiration, intervalDuration, info);
> timer.startTimer(initialExpiration, intervalDuration);
> @@ -265,6 +268,37 @@
> }
>
> /**
> + * Create an interval txtimer whose first expiration occurs at a
> given point in time and
> + * whose subsequent expirations occur after a specified interval.
> + *
> + * @param initialExpiration The point in time at which the first
> txtimer expiration must occur.
> + * @param intervalDuration The number of milliseconds that must
> elapse between txtimer
> + * expiration notifications. Expiration
> notifications are
> + * scheduled relative to the time of
> the first expiration. If
> + * expiration is delayed(e.g. due to
> the interleaving of other
> + * method calls on the bean) two or
> more expiration notifications
> + * may occur in close succession to
> "catch up".
> + * @param info Application information to be
> delivered along with the txtimer expiration
> + * notification. This can be null.
> + * @return The newly created Timer.
> + * @throws IllegalArgumentException If initialExpiration is
> null, or initialExpiration.getTime()
> + * is negative, or
> intervalDuration is negative.
> + * @throws IllegalStateException If this method is invoked
> while the instance is in
> + * a state that does not allow
> access to this method.
> + * @throws javax.ejb.EJBException If this method could not
> complete due to a system-level failure.
> + */
> + public Timer createTimer(Date initialExpiration, long
> intervalDuration, Serializable info) throws
> IllegalArgumentException, IllegalStateException, EJBException
> + {
> + if (initialExpiration == null)
> + throw new IllegalArgumentException("initial expiration is
> null");
> + if (intervalDuration < 0)
> + throw new IllegalArgumentException("interval duration is
> negative");
> +
> + String timerId = timerIdGenerator.nextTimerId();
> + return createTimer(initialExpiration, intervalDuration, info,
> timerId);
> + }
> +
> + /**
> * Get all the active timers associated with this bean.
> *
> * @return A collection of javax.ejb.Timer objects.
>
> Added: branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> UUIDTimerIdGenerator.java
> ===================================================================
> --- branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> UUIDTimerIdGenerator.java (rev 0)
> +++ branches/JBPAPP_5_1/server/src/main/org/jboss/ejb/txtimer/
> UUIDTimerIdGenerator.java 2010-06-09 21:53:50 UTC (rev 105909)
> @@ -0,0 +1,44 @@
> +/*
> + * JBoss, Home of Professional Open Source.
> + * Copyright 2010, Red Hat, Inc. and individual contributors
> + * as indicated by the @author tags. See the copyright.txt file 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.ejb.txtimer;
> +
> +import java.util.UUID;
> +
> +/**
> + * A timerId generator that uses a UUID. The UUID is generated
> + * using the <code>java.util.UUID</code> class.
> + *
> + * @author <a href=mailto:miclark at redhat.com">Mike M. Clark</a>
> + * @version $Revision: $
> + */
> +public class UUIDTimerIdGenerator implements TimerIdGenerator
> +{
> + /**
> + * Get the next timer id.
> + *
> + * @return a UUID.
> + */
> + public synchronized String nextTimerId()
> + {
> + return (String) UUID.randomUUID().toString();
> + }
> +}
>
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 9 Jun 2010 18:44:32 -0400
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBossAS SVN: r105910 -
> branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml.
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> <201006092244.o59MiWaf003035 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
>
> Author: clebert.suconic at jboss.com
> Date: 2010-06-09 18:44:31 -0400 (Wed, 09 Jun 2010)
> New Revision: 105910
>
> Modified:
> branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml/
> DDValidatorUnitTestCase.java
> Log:
> adding ignore
>
> Modified: branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml/
> DDValidatorUnitTestCase.java
> ===================================================================
> --- branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml/
> DDValidatorUnitTestCase.java 2010-06-09 21:53:50 UTC (rev 105909)
> +++ branches/JBPAPP_5_1/testsuite/src/main/org/jboss/test/xml/
> DDValidatorUnitTestCase.java 2010-06-09 22:44:31 UTC (rev 105910)
> @@ -78,6 +78,7 @@
>
> // create-destination: '$
> {test.messagedriven.createDestination}' is not a valid value for
> 'boolean'.
> ignore("messagedriven/jar/META-INF/jboss.xml");
> + ignore("messagedriven/jar-hornetq/META-INF/jboss.xml");
> }
>
> private static void ignore(String path)
>
>
>
> ------------------------------
>
> Message: 3
> Date: Wed, 9 Jun 2010 22:58:34 -0400
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBossAS SVN: r105911 -
> projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator.
>
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> <201006100258.o5A2wY30023246 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
>
> Author: jeff.zhang
> Date: 2010-06-09 22:58:33 -0400 (Wed, 09 Jun 2010)
> New Revision: 105911
>
> Modified:
> projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/
> codegenerator/Main.java
> projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/jca/
> codegenerator/Utils.java
> Log:
> recursiveDelete output directory in codegenerator
>
> Modified: projects/jboss-jca/trunk/codegenerator/src/main/java/org/
> jboss/jca/codegenerator/Main.java
> ===================================================================
> --- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator/Main.java 2010-06-09 22:44:31 UTC (rev 105910)
> +++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator/Main.java 2010-06-10 02:58:33 UTC (rev 105911)
> @@ -22,6 +22,7 @@
> package org.jboss.jca.codegenerator;
>
> import java.io.BufferedReader;
> +import java.io.File;
> import java.io.IOException;
> import java.io.InputStreamReader;
> import java.util.ArrayList;
> @@ -88,6 +89,9 @@
> }
> try
> {
> + File out = new File(outputDir);
> + Utils.recursiveDelete(out);
> +
> ResourceBundle dbconf = ResourceBundle.getBundle
> ("codegenerator", Locale.getDefault());
>
> BufferedReader in = new BufferedReader(new InputStreamReader
> (System.in));
>
> Modified: projects/jboss-jca/trunk/codegenerator/src/main/java/org/
> jboss/jca/codegenerator/Utils.java
> ===================================================================
> --- projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator/Utils.java 2010-06-09 22:44:31 UTC (rev 105910)
> +++ projects/jboss-jca/trunk/codegenerator/src/main/java/org/jboss/
> jca/codegenerator/Utils.java 2010-06-10 02:58:33 UTC (rev 105911)
> @@ -148,4 +148,34 @@
>
> return new FileWriter(file);
> }
> +
> + /**
> + * Recursive delete
> + * @param f The file handler
> + * @exception IOException Thrown if a file could not be deleted
> + */
> + public static void recursiveDelete(File f) throws IOException
> + {
> + if (f != null && f.exists())
> + {
> + File[] files = f.listFiles();
> + if (files != null)
> + {
> + for (int i = 0; i < files.length; i++)
> + {
> + if (files[i].isDirectory())
> + {
> + recursiveDelete(files[i]);
> + }
> + else
> + {
> + if (!files[i].delete())
> + throw new IOException("Could not delete " +
> files[i]);
> + }
> + }
> + }
> + if (!f.delete())
> + throw new IOException("Could not delete " + f);
> + }
> + }
> }
>
>
>
> ------------------------------
>
> Message: 4
> Date: Wed, 9 Jun 2010 23:36:04 -0400
> From: jboss-cvs-commits at lists.jboss.org
> Subject: [jboss-cvs] JBoss Messaging SVN: r8056 - in
> branches/Branch_1_4:
> tests/src/org/jboss/test/messaging/jms/server/destination and
> 1 other
> directory.
> To: jboss-cvs-commits at lists.jboss.org
> Message-ID:
> <201006100336.o5A3a4TD001714 at svn01.web.mwc.hst.phx2.redhat.com>
> Content-Type: text/plain; charset=UTF-8
>
> Author: gaohoward
> Date: 2010-06-09 23:36:03 -0400 (Wed, 09 Jun 2010)
> New Revision: 8056
>
> Modified:
> branches/Branch_1_4/src/main/org/jboss/jms/server/destination/
> DestinationServiceSupport.java
> branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/
> destination/QueueManagementTest.java
> branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/server/
> destination/TopicManagementTest.java
> Log:
> JBMESSAGING-1807
>
>
> Modified: branches/Branch_1_4/src/main/org/jboss/jms/server/
> destination/DestinationServiceSupport.java
> ===================================================================
> --- branches/Branch_1_4/src/main/org/jboss/jms/server/destination/
> DestinationServiceSupport.java 2010-06-04 07:56:10 UTC (rev 8055)
> +++ branches/Branch_1_4/src/main/org/jboss/jms/server/destination/
> DestinationServiceSupport.java 2010-06-10 03:36:03 UTC (rev 8056)
> @@ -105,9 +105,15 @@
> //https://jira.jboss.org/jira/browse/JBMESSAGING-1667
> if (name.contains("/"))
> {
> - throw new IllegalStateException("The " + (isQueue() ?
> "queue" : "topic") +
> + //https://jira.jboss.org/jira/browse/JBMESSAGING-1807
> + String jndiName = getJNDIName();
> +
> + if (jndiName == null)
> + {
> + throw new IllegalStateException("The " + (isQueue
> () ? "queue" : "topic") +
> " " +
> "name should not contain
> forward slash: " + name);
> + }
> }
>
> destination.setName(name);
>
> Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/QueueManagementTest.java
> ===================================================================
> --- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/QueueManagementTest.java 2010-06-04 07:56:10
> UTC (rev 8055)
> +++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/QueueManagementTest.java 2010-06-10 03:36:03
> UTC (rev 8056)
> @@ -914,6 +914,22 @@
> }
> }
>
> + //https://jira.jboss.org/browse/JBMESSAGING-1807
> + public void testQueueDeploymentWithForwardSlashedName2() throws
> Exception
> + {
> + String config =
> + "<mbean code=
> \"org.jboss.jms.server.destination.QueueService\" " +
> + " name=\"somedomain:service=Queue,name=example/tests/
> myqueue/ver1\"" +
> + " xmbean-dd=\"xmdesc/Queue-xmbean.xml\">" +
> + " <depends optional-attribute-name=\"ServerPeer
> \">jboss.messaging:service=ServerPeer</depends>" +
> + " <attribute name=\"MessageCounterHistoryDayLimit\">10</
> attribute>" +
> + " <attribute name=\"JNDIName\">queue/example/tests/
> myqueue/ver1</attribute>" +
> + "</mbean>";
> +
> + deploy(config);
> + undeployDestination("example/tests/myqueue/ver1");
> + }
> +
> // Package protected ---------------------------------------------
>
> // Protected -----------------------------------------------------
>
> Modified: branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/TopicManagementTest.java
> ===================================================================
> --- branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/TopicManagementTest.java 2010-06-04 07:56:10
> UTC (rev 8055)
> +++ branches/Branch_1_4/tests/src/org/jboss/test/messaging/jms/
> server/destination/TopicManagementTest.java 2010-06-10 03:36:03
> UTC (rev 8056)
> @@ -933,6 +933,22 @@
> }
> }
>
> + //https://jira.jboss.org/browse/JBMESSAGING-1807
> + public void testTopicDeploymentWithForwardSlashedName2() throws
> Exception
> + {
> + String config =
> + "<mbean code=
> \"org.jboss.jms.server.destination.TopicService\" " +
> + " name=\"somedomain:service=Topic,name=example/tests/
> mytopic/ver1\"" +
> + " xmbean-dd=\"xmdesc/Topic-xmbean.xml\">" +
> + " <depends optional-attribute-name=\"ServerPeer
> \">jboss.messaging:service=ServerPeer</depends>" +
> + " <attribute name=\"MessageCounterHistoryDayLimit\">10</
> attribute>" +
> + " <attribute name=\"JNDIName\">/topic/whatever</
> attribute>" +
> + "</mbean>";
> +
> + deploy(config);
> + undeployDestination("example/tests/mytopic/ver1");
> + }
> +
> // Package protected ---------------------------------------------
>
> // Protected -----------------------------------------------------
>
>
>
> ------------------------------
>
> _______________________________________________
> jboss-cvs-commits mailing list
> jboss-cvs-commits at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/jboss-cvs-commits
>
>
> End of jboss-cvs-commits Digest, Vol 48, Issue 123
> **************************************************
More information about the jboss-cvs-commits
mailing list