[jira] [Reopened] (AMQ-4683) Scheduler discards overdue messages on startup

2013-08-23 Thread Andrey Zavodnik (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrey Zavodnik reopened AMQ-4683:
--


 Scheduler discards overdue messages on startup
 --

 Key: AMQ-4683
 URL: https://issues.apache.org/jira/browse/AMQ-4683
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.8.0
 Environment: Windows 7 64bit, JDK 1.6.0_26
Reporter: Andrey Zavodnik
Assignee: Timothy Bish
Priority: Critical
  Labels: scheduler
 Fix For: 5.9.0

 Attachments: LostScheduledMessagesTest.java


 When message is scheduled for a delivery (using AMQ_SCHEDULED_PERIOD 
 property) it is not posted to the queue, but saved to the scheduler’s 
 repository instead. If Broker instance is shut down at the time for which the 
 message is scheduled for a delivery, the scheduler will try to process the 
 message at the next time broker is started up. Due to a bug in the scheduler 
 implementation such messages may be dismissed rather than posted to the queue 
 depending on the racing conditions inside the JVM.
 Actual bug resides in 
 org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler() 
 method. 
 This method first calls JobSchedulerStoreImpl. getJobScheduler(String name) 
 method which in turn creates an instance of runnable JobSchedulerImpl class 
 and starts it.
 Then SchedulerBroker registers itselfas a listener of the newly created 
 JobSchedulerImpl.
 Unfortunately this may happen after the JobSchedulerImpl have dismissed all 
 the “missed” tasks as “fired” as there were no listeners configured.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (AMQ-4683) Scheduler discards overdue messages on startup

2013-08-23 Thread Andrey Zavodnik (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13748380#comment-13748380
 ] 

Andrey Zavodnik commented on AMQ-4683:
--

The current fix (revision 1516561) makes JobSchedulerImpl to wait on a 
semaphore until the main thread executes either doStart() or addListener().
This fix has two big issues:
1. If the main thread manages to execute addListener() before the 
JobSchedulerImpl thread arrives to semaphore wait() point, the JobSchedulerImpl 
thread will be blocked indefinitely.
2. JobSchedulerImpl is designed to accept an arbitrary number of listeners. 
This solution will only work when there is exactly one. If zero, worker will be 
blocked. If more than one, there is a chance that listeners number 2 and over 
will not receive a notification, just like the first one didn't in the original 
bug.

 Scheduler discards overdue messages on startup
 --

 Key: AMQ-4683
 URL: https://issues.apache.org/jira/browse/AMQ-4683
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.8.0
 Environment: Windows 7 64bit, JDK 1.6.0_26
Reporter: Andrey Zavodnik
Assignee: Timothy Bish
Priority: Critical
  Labels: scheduler
 Fix For: 5.9.0

 Attachments: LostScheduledMessagesTest.java


 When message is scheduled for a delivery (using AMQ_SCHEDULED_PERIOD 
 property) it is not posted to the queue, but saved to the scheduler’s 
 repository instead. If Broker instance is shut down at the time for which the 
 message is scheduled for a delivery, the scheduler will try to process the 
 message at the next time broker is started up. Due to a bug in the scheduler 
 implementation such messages may be dismissed rather than posted to the queue 
 depending on the racing conditions inside the JVM.
 Actual bug resides in 
 org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler() 
 method. 
 This method first calls JobSchedulerStoreImpl. getJobScheduler(String name) 
 method which in turn creates an instance of runnable JobSchedulerImpl class 
 and starts it.
 Then SchedulerBroker registers itselfas a listener of the newly created 
 JobSchedulerImpl.
 Unfortunately this may happen after the JobSchedulerImpl have dismissed all 
 the “missed” tasks as “fired” as there were no listeners configured.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Build failed in Jenkins: ActiveMQ-Java7 » ActiveMQ :: STOMP Protocol #275

2013-08-23 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-stomp/275/

--
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectStarted
INFO: 
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectStarted
INFO: 
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectStarted
INFO: Building ActiveMQ :: STOMP Protocol 5.9-SNAPSHOT
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectStarted
INFO: 
Downloading: 
http://repo.maven.apache.org/maven2/org/eclipse/jetty/maven-jetty-plugin/7.6.9.v20130131/maven-jetty-plugin-7.6.9.v20130131.pom
[WARNING] The POM for org.eclipse.jetty:maven-jetty-plugin:jar:7.6.9.v20130131 
is missing, no dependency information available
[WARNING] Failed to retrieve plugin descriptor for 
org.eclipse.jetty:maven-jetty-plugin:7.6.9.v20130131: Plugin 
org.eclipse.jetty:maven-jetty-plugin:7.6.9.v20130131 or one of its dependencies 
could not be resolved: Failed to read artifact descriptor for 
org.eclipse.jetty:maven-jetty-plugin:jar:7.6.9.v20130131
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:46 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-clean-plugin:2.5:clean (default-clean) @ activemq-stomp ---
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-enforcer-plugin:1.0.1:enforce (default) @ activemq-stomp ---
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-bundle-plugin:2.3.7:cleanVersions (cleanVersions) @ 
activemq-stomp ---
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-remote-resources-plugin:1.3:process (default) @ activemq-stomp 
---
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-resources-plugin:2.5:resources (default-resources) @ 
activemq-stomp ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 14 resources
[INFO] skip non existing resourceDirectory 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-stomp/ws/src/main/filtered-resources
[INFO] Copying 3 resources
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:47 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-compiler-plugin:2.5.1:compile (default-compile) @ 
activemq-stomp ---
[INFO] Compiling 24 source files to 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-stomp/ws/target/classes
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-resources-plugin:2.5:testResources (default-testResources) @ 
activemq-stomp ---
[debug] execute contextualize
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 6 resources
[INFO] Copying 3 resources
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-compiler-plugin:2.5.1:testCompile (default-testCompile) @ 
activemq-stomp ---
[INFO] Compiling 30 source files to 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-stomp/ws/target/test-classes
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 9:54:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-surefire-plugin:2.10:test (default-test) @ activemq-stomp ---
[INFO] Surefire report directory: 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-stomp/ws/target/surefire-reports

---
 T E S T S
---

---
 T E S T S
---
Running org.apache.activemq.transport.stomp.ConnectTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 35.695 sec
Running 

Jenkins build is still unstable: ActiveMQ-Java7 » ActiveMQ :: MQTT Protocol #275

2013-08-23 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/ActiveMQ-Java7/org.apache.activemq$activemq-mqtt/275/



Build failed in Jenkins: ActiveMQ-Java7 #275

2013-08-23 Thread Apache Jenkins Server
See https://builds.apache.org/job/ActiveMQ-Java7/275/changes

Changes:

[gtully] https://issues.apache.org/jira/browse/AMQ-4682 - tidy imports and 
format

[gtully] https://issues.apache.org/jira/browse/AMQ-4682 - add jmx mbean, manual 
update, validation and test refactor

[tabish] fix for: https://issues.apache.org/jira/browse/AMQ-4683

[gtully] https://issues.apache.org/jira/browse/AMQ-4682 - implement 
virtualDestinationInterceptor runtime updates

--
[...truncated 8202 lines...]
Aug 23, 2013 11:01:48 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-enforcer-plugin:1.0.1:enforce (default) @ activemq-blueprint ---
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-bundle-plugin:2.3.7:cleanVersions (cleanVersions) @ 
activemq-blueprint ---
Aug 23, 2013 11:01:49 AM hudson.maven.ExecutedMojo init
WARNING: Failed to getClass for org.apache.maven.plugin.source.SourceJarMojo
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
mojoStarted
INFO: --- maven-source-plugin:2.1.2:jar (default-cli) @ activemq-blueprint ---
[INFO] META-INF already added, skipping
[INFO] META-INF/NOTICE already added, skipping
[INFO] META-INF/DEPENDENCIES already added, skipping
[INFO] META-INF/LICENSE already added, skipping
[INFO] Building jar: 
https://builds.apache.org/job/ActiveMQ-Java7/ws/activemq-blueprint/target/activemq-blueprint-5.9-SNAPSHOT-sources.jar
[INFO] META-INF already added, skipping
[INFO] META-INF/NOTICE already added, skipping
[INFO] META-INF/DEPENDENCIES already added, skipping
[INFO] META-INF/LICENSE already added, skipping
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: Skipping ActiveMQ :: Web Demo
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: This project has been banned from the build due to previous failures.
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: Skipping ActiveMQ :: Web Console
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: This project has been banned from the build due to previous failures.
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: Skipping ActiveMQ :: Karaf Integration Tests
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: This project has been banned from the build due to previous failures.
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: 
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: Skipping ActiveMQ :: Integration Test :: Spring 3.1
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 
projectSkipped
INFO: This project has been banned from the build due to previous failures.
Aug 23, 2013 11:01:49 AM org.apache.maven.cli.event.ExecutionEventLogger 

Re: ActiveMQ 5.9 availability

2013-08-23 Thread sumit.wattal
You can use the snapshot builds to give it a try 

http://repository.apache.org/service/local/artifact/maven/redirect?r=snapshotsg=org.apache.activemqa=apache-activemqv=5.9-SNAPSHOTe=tar.gzc=bin



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-availability-tp4670588p4670591.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


ActiveMQ 5.9 availability

2013-08-23 Thread vatsal12
Hi everyone,

I would like to know when ActiveMQ 5.9 will be generally available. I am
very interested in replicated leveldb store.

Thanks,
Vatsal



--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-availability-tp4670588.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


[jira] [Closed] (AMQ-4683) Scheduler discards overdue messages on startup

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish closed AMQ-4683.
-


Fixed on trunk, make future enhancement requests in new issues. 

 Scheduler discards overdue messages on startup
 --

 Key: AMQ-4683
 URL: https://issues.apache.org/jira/browse/AMQ-4683
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.8.0
 Environment: Windows 7 64bit, JDK 1.6.0_26
Reporter: Andrey Zavodnik
Assignee: Timothy Bish
Priority: Critical
  Labels: scheduler
 Fix For: 5.9.0

 Attachments: LostScheduledMessagesTest.java


 When message is scheduled for a delivery (using AMQ_SCHEDULED_PERIOD 
 property) it is not posted to the queue, but saved to the scheduler’s 
 repository instead. If Broker instance is shut down at the time for which the 
 message is scheduled for a delivery, the scheduler will try to process the 
 message at the next time broker is started up. Due to a bug in the scheduler 
 implementation such messages may be dismissed rather than posted to the queue 
 depending on the racing conditions inside the JVM.
 Actual bug resides in 
 org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler() 
 method. 
 This method first calls JobSchedulerStoreImpl. getJobScheduler(String name) 
 method which in turn creates an instance of runnable JobSchedulerImpl class 
 and starts it.
 Then SchedulerBroker registers itselfas a listener of the newly created 
 JobSchedulerImpl.
 Unfortunately this may happen after the JobSchedulerImpl have dismissed all 
 the “missed” tasks as “fired” as there were no listeners configured.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (AMQ-4683) Scheduler discards overdue messages on startup

2013-08-23 Thread Timothy Bish (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13748658#comment-13748658
 ] 

Timothy Bish commented on AMQ-4683:
---

Case 1 analysis is incorrect.
Case 2 is true although the broker implementation doesn't currently use more 
than one listener so it wouldn't happen this way. 

I've made some changes to make the start of dispatching separate from starting 
the store.  Now the start of dispatch occurs when the SchedulerBroker is 
started and is stopped when its stopped.  Any listener added after the broker 
could miss jobs but that's an inherent trait in any event based model. 

 Scheduler discards overdue messages on startup
 --

 Key: AMQ-4683
 URL: https://issues.apache.org/jira/browse/AMQ-4683
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.8.0
 Environment: Windows 7 64bit, JDK 1.6.0_26
Reporter: Andrey Zavodnik
Assignee: Timothy Bish
Priority: Critical
  Labels: scheduler
 Fix For: 5.9.0

 Attachments: LostScheduledMessagesTest.java


 When message is scheduled for a delivery (using AMQ_SCHEDULED_PERIOD 
 property) it is not posted to the queue, but saved to the scheduler’s 
 repository instead. If Broker instance is shut down at the time for which the 
 message is scheduled for a delivery, the scheduler will try to process the 
 message at the next time broker is started up. Due to a bug in the scheduler 
 implementation such messages may be dismissed rather than posted to the queue 
 depending on the racing conditions inside the JVM.
 Actual bug resides in 
 org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler() 
 method. 
 This method first calls JobSchedulerStoreImpl. getJobScheduler(String name) 
 method which in turn creates an instance of runnable JobSchedulerImpl class 
 and starts it.
 Then SchedulerBroker registers itselfas a listener of the newly created 
 JobSchedulerImpl.
 Unfortunately this may happen after the JobSchedulerImpl have dismissed all 
 the “missed” tasks as “fired” as there were no listeners configured.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (AMQ-4683) Scheduler discards overdue messages on startup

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4683?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-4683.
---

Resolution: Fixed

 Scheduler discards overdue messages on startup
 --

 Key: AMQ-4683
 URL: https://issues.apache.org/jira/browse/AMQ-4683
 Project: ActiveMQ
  Issue Type: Bug
  Components: Broker
Affects Versions: 5.8.0
 Environment: Windows 7 64bit, JDK 1.6.0_26
Reporter: Andrey Zavodnik
Assignee: Timothy Bish
Priority: Critical
  Labels: scheduler
 Fix For: 5.9.0

 Attachments: LostScheduledMessagesTest.java


 When message is scheduled for a delivery (using AMQ_SCHEDULED_PERIOD 
 property) it is not posted to the queue, but saved to the scheduler’s 
 repository instead. If Broker instance is shut down at the time for which the 
 message is scheduled for a delivery, the scheduler will try to process the 
 message at the next time broker is started up. Due to a bug in the scheduler 
 implementation such messages may be dismissed rather than posted to the queue 
 depending on the racing conditions inside the JVM.
 Actual bug resides in 
 org.apache.activemq.broker.scheduler.SchedulerBroker.getInternalScheduler() 
 method. 
 This method first calls JobSchedulerStoreImpl. getJobScheduler(String name) 
 method which in turn creates an instance of runnable JobSchedulerImpl class 
 and starts it.
 Then SchedulerBroker registers itselfas a listener of the newly created 
 JobSchedulerImpl.
 Unfortunately this may happen after the JobSchedulerImpl have dismissed all 
 the “missed” tasks as “fired” as there were no listeners configured.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


Jenkins build is unstable: ActiveMQ » ActiveMQ :: Web Demo #1364

2013-08-23 Thread Apache Jenkins Server
See 
https://builds.apache.org/job/ActiveMQ/org.apache.activemq$activemq-web-demo/1364/



Re: ActiveMQ 5.9 availability

2013-08-23 Thread vatsal12
Hi Sumit,

Thank you for your reply.
Actually I was asking for final build. I tried SNAPSHOT.

And quick question. Right now we have Active MQ 5.8 servers in production.
Will it be easy to migrate to 5.9 ? Any special concerns ?






--
View this message in context: 
http://activemq.2283324.n4.nabble.com/ActiveMQ-5-9-availability-tp4670588p4670636.html
Sent from the ActiveMQ - Dev mailing list archive at Nabble.com.


[jira] [Resolved] (AMQ-4676) ActiveMQ not compliant with JSR-250 (@PostConstruct, @PreDestroy)

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-4676.
---

Resolution: Fixed

Made changes to trunk based on these patches, code has changed a bit since 
5.8.0.  Might want to double check that I got them all. 

 ActiveMQ not compliant with JSR-250 (@PostConstruct, @PreDestroy)
 -

 Key: AMQ-4676
 URL: https://issues.apache.org/jira/browse/AMQ-4676
 Project: ActiveMQ
  Issue Type: Bug
  Components: activemq-camel, Broker, stomp
Affects Versions: 5.8.0
Reporter: Steve Siebert
 Fix For: 5.9.0

 Attachments: activemq-broker_AMQ-4676v2.diff, 
 activemq-camel_AMQ-4676v2.diff, activemq-spring_AMQ-4676v2.diff, 
 activemq-stomp_AMQ-4676v2.diff


 ActiveMQ is not compliant with JSR-250, which states:
 2.5 javax.annotation.PostConstruct:
  [...]
  - The method MUST NOT throw a checked exception.
  - If the method throws an unchecked exception the class MUST NOT be put into
 service. In the case of EJBs the method annotated with PostConstruct can
 handle exceptions and cleanup before the bean instance is discarded.
 2.6 javax.annotation.PreDestroy
 (same as above)
 An exception was thrown when attempting to deploy an application using the 
 activemq-rar-5.8 on GF 4.0, but I believe it's safe to say that this can 
 occur in different containers - if not now, potentially between container 
 releases.  
 Included are patches that fix this in all ActiveMQ components.  Most check 
 exceptions thrown were Exception, which was changed to RuntimeException 
 (trapped and wrapped).  There were also IOExceptions being thrown, in which 
 case ActiveMQ-broker now has an IORuntimeException class that is thrown.  Any 
 downstream catches that handled the check exceptions have been converted to 
 catch the RuntimeExceptions.
 This was also reported under AMQ-4673, but the scope of that issue was a lot 
 more limited.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Updated] (AMQ-4673) Application that uses activemq-camel fails deploying to GlassFish v4

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish updated AMQ-4673:
--

Fix Version/s: 5.9.0

 Application that uses activemq-camel fails deploying to GlassFish v4
 

 Key: AMQ-4673
 URL: https://issues.apache.org/jira/browse/AMQ-4673
 Project: ActiveMQ
  Issue Type: Bug
  Components: activemq-camel
Affects Versions: 5.6.0
 Environment: Mac OS X, Java 1.7.0_25, GlassFish v4
Reporter: Kevin Schmidt
 Fix For: 5.9.0

 Attachments: CamelEndpointLoader.patch


 I have an application that uses activemq-camel and deploys/works fine with 
 GlassFish v3.  I tried to deploy the same application on GlassFish v4 and get 
 this error:
 remote failure: Error occurred during deployment: Exception while deploying 
 the app [appname] : The lifecycle method [afterPropertiesSet] must not throw 
 a checked exception. Related annotation information: annotation 
 [@javax.annotation.PostConstruct()] on annotated element [public void 
 org.apache.activemq.camel.component.CamelEndpointLoader.afterPropertiesSet() 
 throws java.lang.Exception] of type [METHOD]. Please see server.log for more 
 details.
 Command deploy failed.
 It appears that CamelEndpointLoader has a @PostConstruct method that throws 
 an Exception and per the Java EE spec that isn't allowed.  Apparently 
 GlassFish v3 was lenient but v4 is not.
 Looking at the code, it is easy to fix.  The afterPropertiesSet method just 
 needs to catch the exceptions from addQueue/addTopic and log them at the end 
 of the method like it does earlier in the method.  If a failure to add these 
 during the method should actually be considered a failure, then something 
 like IllegalStateException or another unchecked exception should be thrown 
 instead.
 This fix has been tested and verified to get past the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (AMQ-4673) Application that uses activemq-camel fails deploying to GlassFish v4

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4673?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-4673.
---

Resolution: Fixed

Made changes on trunk to fix this.  

 Application that uses activemq-camel fails deploying to GlassFish v4
 

 Key: AMQ-4673
 URL: https://issues.apache.org/jira/browse/AMQ-4673
 Project: ActiveMQ
  Issue Type: Bug
  Components: activemq-camel
Affects Versions: 5.6.0
 Environment: Mac OS X, Java 1.7.0_25, GlassFish v4
Reporter: Kevin Schmidt
 Fix For: 5.9.0

 Attachments: CamelEndpointLoader.patch


 I have an application that uses activemq-camel and deploys/works fine with 
 GlassFish v3.  I tried to deploy the same application on GlassFish v4 and get 
 this error:
 remote failure: Error occurred during deployment: Exception while deploying 
 the app [appname] : The lifecycle method [afterPropertiesSet] must not throw 
 a checked exception. Related annotation information: annotation 
 [@javax.annotation.PostConstruct()] on annotated element [public void 
 org.apache.activemq.camel.component.CamelEndpointLoader.afterPropertiesSet() 
 throws java.lang.Exception] of type [METHOD]. Please see server.log for more 
 details.
 Command deploy failed.
 It appears that CamelEndpointLoader has a @PostConstruct method that throws 
 an Exception and per the Java EE spec that isn't allowed.  Apparently 
 GlassFish v3 was lenient but v4 is not.
 Looking at the code, it is easy to fix.  The afterPropertiesSet method just 
 needs to catch the exceptions from addQueue/addTopic and log them at the end 
 of the method like it does earlier in the method.  If a failure to add these 
 during the method should actually be considered a failure, then something 
 like IllegalStateException or another unchecked exception should be thrown 
 instead.
 This fix has been tested and verified to get past the problem.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Created] (AMQ-4689) Allow for JobSchedulerStore implementations to be provided by the PersistenceAdapter

2013-08-23 Thread Timothy Bish (JIRA)
Timothy Bish created AMQ-4689:
-

 Summary: Allow for JobSchedulerStore implementations to be 
provided by the PersistenceAdapter
 Key: AMQ-4689
 URL: https://issues.apache.org/jira/browse/AMQ-4689
 Project: ActiveMQ
  Issue Type: Improvement
  Components: Broker, Message Store
Affects Versions: 5.8.0
Reporter: Timothy Bish
Assignee: Timothy Bish
Priority: Minor
 Fix For: 5.9.0


We currently create a JobSchedulerStore by looking for the KahaDB 
implementation which means another store can't implement one itself and provide 
that instead of always needing the KahaDB implementation always. 

We can use the PListStore approach and check if the PersistenceAdapter 
implements JobSchedulerStore before we jump into the KahaDB lookup code.  

It would be nice if the details of directory etc could be removed from 
BrokerService and be configured via the persistence adapter but for now we 
probably don't want to break backwards configuration compat.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Resolved] (AMQ-4689) Allow for JobSchedulerStore implementations to be provided by the PersistenceAdapter

2013-08-23 Thread Timothy Bish (JIRA)

 [ 
https://issues.apache.org/jira/browse/AMQ-4689?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Timothy Bish resolved AMQ-4689.
---

Resolution: Fixed

Updates added to trunk.  

 Allow for JobSchedulerStore implementations to be provided by the 
 PersistenceAdapter
 

 Key: AMQ-4689
 URL: https://issues.apache.org/jira/browse/AMQ-4689
 Project: ActiveMQ
  Issue Type: Improvement
  Components: Broker, Message Store
Affects Versions: 5.8.0
Reporter: Timothy Bish
Assignee: Timothy Bish
Priority: Minor
 Fix For: 5.9.0


 We currently create a JobSchedulerStore by looking for the KahaDB 
 implementation which means another store can't implement one itself and 
 provide that instead of always needing the KahaDB implementation always. 
 We can use the PListStore approach and check if the PersistenceAdapter 
 implements JobSchedulerStore before we jump into the KahaDB lookup code.  
 It would be nice if the details of directory etc could be removed from 
 BrokerService and be configured via the persistence adapter but for now we 
 probably don't want to break backwards configuration compat.  

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira


[jira] [Commented] (AMQ-4676) ActiveMQ not compliant with JSR-250 (@PostConstruct, @PreDestroy)

2013-08-23 Thread Steve Siebert (JIRA)

[ 
https://issues.apache.org/jira/browse/AMQ-4676?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=13749230#comment-13749230
 ] 

Steve Siebert commented on AMQ-4676:


Just wanted to verify, I checked out the latest trunk and looks like you got 
them all.  Thanks!

 ActiveMQ not compliant with JSR-250 (@PostConstruct, @PreDestroy)
 -

 Key: AMQ-4676
 URL: https://issues.apache.org/jira/browse/AMQ-4676
 Project: ActiveMQ
  Issue Type: Bug
  Components: activemq-camel, Broker, stomp
Affects Versions: 5.8.0
Reporter: Steve Siebert
 Fix For: 5.9.0

 Attachments: activemq-broker_AMQ-4676v2.diff, 
 activemq-camel_AMQ-4676v2.diff, activemq-spring_AMQ-4676v2.diff, 
 activemq-stomp_AMQ-4676v2.diff


 ActiveMQ is not compliant with JSR-250, which states:
 2.5 javax.annotation.PostConstruct:
  [...]
  - The method MUST NOT throw a checked exception.
  - If the method throws an unchecked exception the class MUST NOT be put into
 service. In the case of EJBs the method annotated with PostConstruct can
 handle exceptions and cleanup before the bean instance is discarded.
 2.6 javax.annotation.PreDestroy
 (same as above)
 An exception was thrown when attempting to deploy an application using the 
 activemq-rar-5.8 on GF 4.0, but I believe it's safe to say that this can 
 occur in different containers - if not now, potentially between container 
 releases.  
 Included are patches that fix this in all ActiveMQ components.  Most check 
 exceptions thrown were Exception, which was changed to RuntimeException 
 (trapped and wrapped).  There were also IOExceptions being thrown, in which 
 case ActiveMQ-broker now has an IORuntimeException class that is thrown.  Any 
 downstream catches that handled the check exceptions have been converted to 
 catch the RuntimeExceptions.
 This was also reported under AMQ-4673, but the scope of that issue was a lot 
 more limited.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira