DuplicateServiceException on JBoss 7 with ActiveMQ
by Steven
Hi list,
I'm trying to run a MessageDrivenBean on JBoss, connecting to an
ActiveMQ broker outside of JBoss.
However when starting JBoss I get the following error as the cause of a
larger stacktrace:
org.jboss.msc.service.DuplicateServiceException: Service
jboss.connector.connection-factory.java:jboss/activemq/ConnectionFactory
is already registered
It appears I'm hitting this bug:
https://issues.jboss.org/browse/JBJCA-641
Unfortunately the workaround doesn't seem to work, or I'm missing
something. Also, the bug is marked closed as of agust 5th 2011 and no
comments were ever added to it.
Has anyone successfully connected JBoss 7 to an ActiveMQ broker already?
I've seen several forum posts about it, but none of them were ever
solved.
I'm running JBoss 7.1.0.CR1b and trying to use a resource adapter from
ActiveMQ 5.5.1. The configuration is pretty default, no changes were
made to the ra.xml inside the activemq-rar-5.5.1.rar file (dropped in
standalone/deployments), the standalone.xml was modified to use ActiveMQ
for mdb's instead of hornetQ and to include a resource-adapter subsystem
definition with connection-definitions like this:
<connection-definition
class-name="org.apache.activemq.ra.ActiveMQManagedConnectionFactory"
jndi-name="java:jboss/activemq/TopicConnectionFactory"
currently 3 exist.
Any suggestions?
Kind regards,
Steven
14 years, 2 months
[jBPM] - Latest Eclipse BPMN2 Plug-In does not seem to fully support jBPM5?
by jemmerling
jemmerling [https://community.jboss.org/people/jemmerling] created the discussion
"Latest Eclipse BPMN2 Plug-In does not seem to fully support jBPM5?"
To view the discussion, visit: https://community.jboss.org/message/647182#647182
--------------------------------------------------------------
So far as I know, the Eclipse BPMN2 Plug-In discussed in Chapter 9 of the jBPM5.2 User's Guide does not fully support jBPM5 has been retired and replaced with a Plug-In that can be installed from the Eclipse site at http://download.eclipse.org/bpmn2-modeler/site/ http://download.eclipse.org/bpmn2-modeler/site/.
I tried using this, and concluded that it does not fully support jBPM5. I can't go back and compare to the previous version (which was installable from the URL in Chapter 9 of the User's Guide) however this version does not seem fully compatible.
Not being a jBPM5 guru or a BPMN2 guru, I will explain why I believe this.
a.) Some diagrams created with the Drools plug-in (that is automatically installed when installing the jBPM5 demo) cannot be opened with this editor.
b.) I a diagram can be opened, then it looks good in the editor, but if you try to look at what are called "variables" in the Drools editor, you see that they do not seem to be displayed properly. To give an example, if I want a process variable named "userId" and I define it using the Drools editor, then these two lines will be added to my *.bpmn file:
<itemDefinition id="_userIdItem" structureRef="Object" /> *<!-- first line item definition -->*
+ <process processType="Private" isExecutable="true" id="com.sample.bpmn" name="Sample Process" tns:packageName="defaultPackage" >+
<!-- process variables -->
<property id="userId" itemSubjectRef="_userIdItem"/> *<!-- second line property definition -->*
So try view these definition with the "new" plug-in (assuming you can open your diagram to start with) and if you have the same experience as me, what you see will not make sense to you.
c.) Use the new plug-in to create a diagram. Then try to create item definitions and properties. There seems to be a way to create one or more item definitions, if you do, they will be created with some default id e.g. ItemDefinition_1, ItemDefinition_2, etc. and then it would be possible to rename these. Trying to define a process property, it lets you do that but doesn't seem to allow you to specify the "structureRef" attribute.
So I guess my question(s) would be:
Is this plug-in supposed to support jBPM5 at this time?
If not, is there a plan for full jBPM5 support in future?
Or is there a different approach to specifying a process that one should use (in light of the issues I have raised above) when using this plug-in with jBPM5?
Thanks, I hope nobody has taken offense at this posting!
--JE
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/647182#647182]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
14 years, 2 months
[JBoss Tools] - CSS and JS minification using Eclipse, Maven and WRO4J
by Fred Bricon
Fred Bricon [https://community.jboss.org/people/fbricon] modified the blog post:
"CSS and JS minification using Eclipse, Maven and WRO4J"
To view the blog post, visit: https://community.jboss.org/community/tools/blog/2012/01/17/css-and-js-mi...
--------------------------------------------------------------
While developping web applications, it's common best practice to minify (and sometimes obfuscate) static resources such as javascript and css files.
Such resource processing can be done either at build time or at run time, depending on the tools you're using.
Surprisingly, tooling and documentation is rather scarce when it comes to web resource optimization in the Eclipse World.
On the other hand, maven has a wide variety of plugins wrapping around well-known 3rd party optimizers. In particular, http://code.google.com/p/wro4j/ Web Resource Optimizer for Java, a.k.a WRO4J is a :
"Free and Open Source Java project which brings together almost all the modern web tools: JsHint, CssLint, JsMin,
Google Closure compressor, YUI Compressor, UglifyJs, Dojo Shrinksafe, Css Variables Support, JSON Compression,
Less, Sass, CoffeeScript and much more. In the same time, the aim is to keep it as simple as possible and as
extensible as possible in order to be easily adapted to application specific needs."
http://code.google.com/p/wro4j/
While WRO4J can be used at runtime, it also provides a maven plugin if you prefer a build time approach : http://code.google.com/p/wro4j/wiki/MavenPlugin wro4j-maven-plugin,.
Since Eclipse WTP allows you to incrementally deploy changed resources in your workspace directly to your prefered application server,
having a way to do on-the-fly resource optimization deployment would be great, wouldn't it?
Now, m2e (the Maven Integration for Eclipse plugin) users probably know, or will know soon enough, that m2e doesn't run maven plugins it doesn't know about. So having
<plugins>
<plugin>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<version>${wro4j.version}</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
<configuration>
<targetGroups>all</targetGroups>
<destinationFolder>${basedir}/src/main/webapp/wro/</destinationFolder>
<contextFolder>${basedir}/src/main/webapp/</contextFolder>
</configuration>
</plugin>
</plugins>
would result in the dreaded http://wiki.eclipse.org/M2E_plugin_execution_not_covered "plugin execution not covered" error. Indeed, since Eclipse is all about incremental building (i.e. builds modified resources as soon as they're saved),
triggering long-running maven plugin every time a file is changed in the workspace would be a disaster. So m2e requires users to be explicit about what maven plugins should be run and when.
As a consequence, in order for these unknown plugins to be run on incremental builds, users need to modify their project pom.xml (or their parent pom.xml) and add a lifecycle-mapping configuration like (in the case of wro4j) :
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>ro.isdc.wro4j</groupId>
<artifactId>wro4j-maven-plugin</artifactId>
<versionRange>[1.0,)</versionRange>
<goals>
<goal>run</goal>
</goals>
</pluginExecutionFilter>
<action>
<execute/>
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
...
</plugins>
Eventually, that lifecycle mapping would execute WRO4J on each and every file change in your project. That's a bit extreme, but the biggest problem is the generated files wouldn't be synchronized with the workspace so wouldn't be deployed automatically on a WTP server.
Here comes the https://github.com/fbricon/m2e-wro4j m2e-wro4j connector : it's an eclipse plugin (in its early phase) that :
* allows wro4j-maven-plugin to be invoked when .js, .css, .coffee, .less, .scss files are modified. Modifying the pom.xml also triggers the m2e-wro4j connector.
* is always invoked on clean builds
* updates the output folders so the changes can be visible directly in Eclipse and deployed directly via WTP if needed
* automatically translates *${project.build.directory}/${project.build.finalName}/* output directories to *${project.build.directory}/m2e-wtp/web-resources/* if m2e-wtp is detected
* Provides a wro4j-maven-plugin template, available on ctrl+space in the pom editor, in the <plugins> section :
https://community.jboss.org/servlet/JiveServlet/showImage/38-4446-17791/w... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4446-177...
Using the above wro4j-maven-plugin configuration, and provided you have an wro.xml descriptor under +src/main/webapp/WEB-INF+, you can see in the following example the 2 css files are combined and minified into one all.css file under +/target/m2e-wtp/web-resources/resources/styles/+ and the javascript file is minified under +/target/m2e-wtp/web-resources/resources/styles/all.js+
https://community.jboss.org/servlet/JiveServlet/showImage/38-4446-17792/w... https://community.jboss.org/servlet/JiveServlet/downloadImage/38-4446-177...
If you're interested in trying m2e-wro4j, you can install it from the following p2 update site : http://download.jboss.org/jbosstools/builds/staging/m2e-wro4j/all/repo/ http://download.jboss.org/jbosstools/builds/staging/m2e-wro4j/all/repo/
Please be aware this initial version is really in its alpha stage (was coded in a day). Issues can be opened at https://github.com/fbricon/m2e-wro4j/issues https://github.com/fbricon/m2e-wro4j/issues
For all your WRO4J or wro4j-maven-plugin specific issues, I strongly encourage you to :
* read the WRO4J http://code.google.com/p/wro4j/wiki/GettingStarted getting started page and the http://code.google.com/p/wro4j/wiki/MavenPlugin Maven plugin documentation
* ask the google group directly : http://groups.google.com/group/wro4j?pli=1 http://groups.google.com/group/wro4j
Hope it helps.
Fred
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/community/tools/blog/2012/01/17/css-and-js-mi...]
14 years, 2 months