{"id":38,"date":"2010-04-29T10:04:55","date_gmt":"2010-04-29T09:04:55","guid":{"rendered":"http:\/\/www.jroller.com\/peter_pilgrim\/entry\/eclipse_compiler_versus_the_sun"},"modified":"2010-04-29T10:04:55","modified_gmt":"2010-04-29T09:04:55","slug":"eclipse-compiler-versus-the-sun-jdk-java-compiler-wddtg","status":"publish","type":"post","link":"https:\/\/www.xenonique.co.uk\/blog\/2010\/04\/29\/eclipse-compiler-versus-the-sun-jdk-java-compiler-wddtg\/","title":{"rendered":"Eclipse Compiler versus the Sun JDK Java Compiler: WDDTG"},"content":{"rendered":"<h1>Eclipse Compiler versus the Sun JDK Java Compiler<\/h1>\n<p>What is the different between the following code fragments for a Java EE 5 style Message Driven Bean?<\/p>\n<p><p> Extract 1 <\/p>\n<pre>\n\/\/ Code1\n@MessageDriven (\n        activationConfig = {\n            @ActivationConfigProperty(propertyName=\"connectionFactoryJndiName\", propertyValue=\"xygot.mq.web.Q1CF\"),\n            @ActivationConfigProperty(propertyName=\"destination\", propertyValue=\"xygot.mq.web.Q1\"),\n            @ActivationConfigProperty(propertyName=\"destinationType\", propertyValue=\"javax.jms.Queue\"),\n        }\n    )\npublic class XygotMessageService1 extends AbstractXygotMessageService {\n\n}\n<\/pre>\n<p> Extract 2 <\/p>\n<pre>\n\/\/ Code2\n@MessageDriven (\n        activationConfig = {\n            @ActivationConfigProperty(propertyName=\"connectionFactoryJndiName\", propertyValue=\"xygot.mq.web.Q1CF\"),\n            @ActivationConfigProperty(propertyName=\"destination\", propertyValue=\"xygot.mq.web.Q1\"),\n            @ActivationConfigProperty(propertyName=\"destinationType\", propertyValue=\"javax.jms.Queue\")\n        }\n    )\npublic class XygotMessageService1 extends AbstractXygotMessageService {\n\n}\n<\/pre>\n<p>\nThe difference is the first extract compiles with the Eclipse Compiler inside Galileo no problem.<br \/>\nThe second extract compiles with an error <code>XygotMessageService1.java:[19,8] illegal start of expression<\/code>.<br \/>\nThere is an extra comma in the activationConfig initialiser list in the MessageDriven annotation.<br \/>\nThis simple error causes several hours of search, frustration and a waste of time, because<br \/>\nit was buried in a large Maven project. Obviously, the MDB were part of<br \/>\nEJB package Maven module inside a multi-module Maven project.\n<\/p>\n<p>\nI cannot get those hours back, not ever.<br \/>\n<strong>W<\/strong>here<br \/>\n<strong>D<\/strong>oes<br \/>\n<strong>Developer<\/strong><br \/>\n<strong>Time<\/strong><br \/>\n<strong>G<\/strong>o?\n<\/p>\n<p><br clear=\"all\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Eclipse Compiler versus the Sun JDK Java Compiler What is the different between the following code fragments for a Java EE 5 style Message Driven Bean? Extract 1 \/\/ Code1 @MessageDriven ( activationConfig = { @ActivationConfigProperty(propertyName=&#8221;connectionFactoryJndiName&#8221;, propertyValue=&#8221;xygot.mq.web.Q1CF&#8221;), @ActivationConfigProperty(propertyName=&#8221;destination&#8221;, propertyValue=&#8221;xygot.mq.web.Q1&#8243;), @ActivationConfigProperty(propertyName=&#8221;destinationType&#8221;, propertyValue=&#8221;javax.jms.Queue&#8221;), } ) public class XygotMessageService1 extends AbstractXygotMessageService { } Extract 2 \/\/ Code2 @MessageDriven [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[4],"tags":[],"_links":{"self":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/38"}],"collection":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/comments?post=38"}],"version-history":[{"count":0,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/posts\/38\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/media?parent=38"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/categories?post=38"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xenonique.co.uk\/blog\/wp-json\/wp\/v2\/tags?post=38"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}