[JBoss Tools] - Extending the Eclipse Annotation Properties view
by Brian Fitzpatrick
Brian Fitzpatrick [http://community.jboss.org/people/bfitzpat] modified the blog post:
"Extending the Eclipse Annotation Properties view"
To view the blog post, visit: http://community.jboss.org/community/jbosstools/blog/2010/09/13/extending...
--------------------------------------------------------------
While looking into some options on how to make the use of annotations simpler for users, I ran across the Annotation Properties view, which is in Helios in the JAX-WS->Annotation Properties view category when you're trying to open a view (Window->Show View->Other).
If you haven't seen this view before (and I know I hadn't), it offers a way to register annotation classes in a common place to allow you to add/remove/edit annotations in a class. By default in the Helios JEE package, it comes with JAXB and JAX-WS annotations already set up. It's a little clunky in spots, but I think it offers some interesting options as far as functionality goes.
For example, to create a new JAX-WS annotated class, you can start with your favorite POJO and annotate it pretty quickly:
http://community.jboss.org/servlet/JiveServlet/showImage/38-1946-7286/Ann... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-1946-7286...
The view also offers the ability to filter the available annotations so you're not simply overwhelmed. To get to the Filters dialog, use the View menu and select Filters...
http://community.jboss.org/servlet/JiveServlet/showImage/38-1946-7287/ann... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-1946-7287...
This is a little clunky as far as an interface goes. You can only open one instance of the view at a time and can't easily switch between annotation types. But it's a start anyway.
So with this in mind, I asked in the WTP newsgroup about how to go about extending it. Shane Clarke was nice enough to provide some tips...
The two extension points associated with the Annotation Properties view are located in the org.eclipse.jst.ws.annotations.core plug-in. The main two are the the org.eclipse.jst.ws.annotations.core.annotationCategory and org.eclipse.jst.ws.annotations.core.annotationDefinition extension points. Basically you just define a category (which shows up in the Filters dialog) and then define one or more associated annotation classes.
The only trick is making sure that the annotations are on the plug-in classpath and then adding the line "Eclipse-RegisterBuddy: org.eclipse.jst.ws.annotations.core" to your MANIFEST.MF.
So as an example, we'll just create a new category:
<extension
point="org.eclipse.jst.ws.annotations.core.annotationCategory">
<category
id="org.my.annotation.category"
name="My Category Name">
</category>
</extension>
And then we'll define a new annotation for it:
<extension
point="org.eclipse.jst.ws.annotations.core.annotationDefinition">
<annotation
category="org.my.annotation.category"
class="some.annotation.class.MyAnnotation"
name="MyAnnotation">
</annotation>
</extension>
For examples of how they implemented the JAX-WS and JAXB annotations, check out org.eclipse.jst.ws.jaxws.core and org.eclipse.jst.ws.jaxb.core.
Pretty easy. I was able to define annotations for some new functionality in our JBoss ESB product that allows you to annotate a class instead of extending a particular interface or extending an existing class.
http://community.jboss.org/servlet/JiveServlet/showImage/38-1946-7288/ann... http://community.jboss.org/servlet/JiveServlet/downloadImage/38-1946-7288...
I obviously think that the Annotation Properties view could be used for more than just Web Service class annotations.
But it needs a bit of work... For example, it would be nice if you could create a saved setting like a working set and made more visible - perhaps in the toolbar area at the top of the view. And it would be great if you could create multiple instances and associate a particular view instance with an editor, similar to how the Project Explorer can be linked to the editors and show which file is being worked on.
And I'm not quite sure how to use all of the functionality - like those other two extension points - or some of the settings on the annotationDefinition extension.
That said, I think it's a great start and it would be awesome to have a consistent way to annotate Java classes. I'm not sure that this is really a WTP-specific view and think it would make more sense in the more general Java tools category, but that's just me.
Big thanks to Shane for the pointers and I'm looking forward to seeing how this functionality improves in future releases!
--Fitz
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/community/jbosstools/blog/2010/09/13/extending...]
14 years, 3 months
Re: [jboss-user] [JBoss Tools] - Building JBoss Tools Documentaion
by John Casey
John Casey [http://community.jboss.org/people/jdcasey] commented on the document
"Building JBoss Tools Documentaion"
To view all comments on this document, visit: http://community.jboss.org/docs/DOC-13341#comment-4122
--------------------------------------------------
Using assembly:assembly is a Really Bad Idea. Not only does this goal run in aggregator mode, which can cause other assemblies in the project tree to be skipped. It also means your asembly is built completely outside the normal build lifecycle, and will not be installed or deployed with your project.
Too often in JBoss projects (so far), I've seen the use of this goal paired with the use of <moduleSets>/<binaries>, which means that your assembly can only be built using a tortured command line.
It's very important that assemblies build as part of your normal build lifecycle, so tooling built around Maven for downstream consumption of your projects can be more consistent.
The recommended approach is to confine your assemblies to a child project, which declares dependencies on the other modules in the build that it bundles. Then, use <dependencySets> instead of <moduleSets>/<binaries> to aggregate these binaries. Finally, use an <execution> block in the POM to bind the assembly:single goal to the build lifecycle, normally under the 'package' phase. This is the recommended standard, and it works pretty well for 99% of cases.
I'm working on a new version of the assembly plugin that will allow the sane use of <moduleSets>, and the milestone I've published is available on http://repository.jboss.org/nexus/ http://repository.jboss.org/nexus/ in the Thirdparty Releases repository. Its version is '2.2-beta-6-m1-jboss'. Basically, you need to add a flag '<useAllReactorProjects>true</useAllReactorProjects>' to each of your <moduleSet> declarations. At that point, you can safely use an assembly with moduleSets from a child project within a multimodule build, and bind the assembly to the main bulid lifecycle.
In any case, move assemblies into a child project, and use dependency declarations within that child to ensure it runs at the appropriate time during the build to consume binaries from other modules.
I'm happy to assist in refactoring these assemblies if anyone wants to find me. Most times I'm on jboss-dev IRC.
--------------------------------------------------
14 years, 3 months
[JBoss Messaging] - Configuring XA Recovery
by Mayank Mittal
Mayank Mittal [http://community.jboss.org/people/mayankmit2002] created the discussion
"Configuring XA Recovery"
To view the discussion, visit: http://community.jboss.org/message/561519#561519
--------------------------------------------------------------
Hello all,
I'm using JBoss 4.2.3 with JBoss Messaging 1.4.4 GA alonng with PostgreSQL.
As per requirement of my software, I've to lookup the JmsXA connectionfactory to fire events.
But whenever I tried to fire an event, follwowing warning appears in the logs.
[CDATA[[com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] [com.arjuna.ats.internal.jta.resources.arjunacore.norecoveryxa] Could not find new XAResource to use for recovering non-serializable XAResource < 131075, 30, 28, 1--6961b6ca:b76b:4c8a4928:5858-6961b6ca:b76b:4c8a4928:58bb >]]>
I tried to google out several sites, and follow their instructions, but still the problems persists.
even I tried the instrcutions from http://archives.postgresql.org/pgsql-jdbc/2007-09/msg00083.php http://archives.postgresql.org/pgsql-jdbc/2007-09/msg00083.php. But it too, didnt help me out...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561519#561519]
Start a new discussion in JBoss Messaging at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months
[jBPM] - Swimlanes and Task Assignements
by Mehmet Salgar
Mehmet Salgar [http://community.jboss.org/people/speleomaniac] created the discussion
"Swimlanes and Task Assignements"
To view the discussion, visit: http://community.jboss.org/message/561487#561487
--------------------------------------------------------------
Hi everybody,
I want to ask you something about swimlanes and task assignements....
I have a following swimlane definition
So when I define that a task should be assigned to swimlane 'Marketing' is jbpm engine would enforce that only the members of the group 'Marketing' would see that and the task can only be assigned to the members of the group 'Marketing'....
But that is not the behaviour that I am seeing at the jbpm-console but I am not sure that is not the functionality of the jbpm console or jbpm engine is not trying to enforce this at all....
When I debug, I notice that the task gets the Actor Pool 'Marketing' but no other enforcing action is there, I can even assign an user from another group.....
I have now difficulties to understand the existence reasons for swimlanes....If swimlanes are not there to enforce which users are assignable for a task, why do we need it?
Thx for the answers...
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/561487#561487]
Start a new discussion in jBPM at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
14 years, 3 months