[JBoss Tools] New message: "Re: Mylyn 3.x with JBT"
by Max Andersen
User development,
A new message was posted in the thread "Mylyn 3.x with JBT":
http://community.jboss.org/message/532412#532412
Author : Max Andersen
Profile : http://community.jboss.org/people/max.andersen@jboss.com
Message:
--------------------------------------------------------------
I know Nick Boldt is a big mylyn fan and I am in principle too but just got bit by a few annoying bugs last time I tried it - but dont let that stop you
I dont have any particular recommendations on using Mylyn beyond what is on the homepage of Mylyn it self.
With respective to JBT and Mylyn then I know we could implement some mylyn specific hooks to make some of our views
more mylyn "aware" and I would like to see that happen in the next round (targeting Eclipse 3.6) where I also plan on
actually trying to use it more again.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/532412#532412
16 years, 4 months
[JBoss Tools Development] New message: "Re: create/extend a builder for hbm files?"
by Denis Golovin
User development,
A new message was posted in the thread "create/extend a builder for hbm files?":
http://community.jboss.org/message/532387#532387
Author : Denis Golovin
Profile : http://community.jboss.org/people/dgolovin
Message:
--------------------------------------------------------------
To make it incremental you have to inject changed files from eclipse. Just define ant property like it shown below.
http://community.jboss.org/servlet/JiveServlet/showImage/2346/ant-inject-...
build_files variable returns the set of absolute file system paths whose modification caused the current build. A list of the characters, 'a' (added), 'c' (changed), 'r' (removed), 'f' (files only), 'd' (directories only), can be supplied as an argument to limit the file list to just those types of deltas. Defaults to all deltas.
My might be needed to define several other variables like where to copy changed files and etc.
It is not easy, but can be done.
If you change three files and then press Save all you'll get those three files injected in build through ${changes} ant property and build will be called once. If you save them on by one -> builder will be called tree times. But you can control it a little with "Targets" tab and configure it to be called only once for manual build for example, but in this case you'll get only one changed resource and that will be project folder.
It could be a problem to change actual files because it could trigger ant script builder twice. First after your change files. Then after ant builder finished and modified actual sources get refreshed as it configured on Refresh tab.
So it could work this way.
1. Your build iterate through ${changes} using <for> and check that changed files if they should be altered with missing attributes. If there is nothing to add it just should skip the file.
2. Add the ant builder to builders list and inject all required params
When you change something it will trigger the builder with list of changed files and then required attributes should be added to sources in project.
Then "Refresh" happens and it triggers builder again, but it does nothing because required attributes already present.
Then it is in waitig state for next changes.
Second option for you is developing plug-in with Incremental builder like it described here http://www.eclipse.org/articles/Article-Builders/builders.html. I remember there is an template in eclipse SDK which does most of the work left for you only actual implementation of several methods.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/532387#532387
16 years, 4 months
Exporting JMX attributes over SNMP: JMX, snmp-adaptor.sar and Spring
by Marc Schoechlin
Hi,
i wrote some jmx-attributes using Spring 3.0.
(see spring descriptor below)
I start JBOSS with the following arguments:
---
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.port=21099 "
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.password.file=${JBOSS_CONFIGDIR}/${JBOSS_INSTANCE}/jmx.password"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.access.file=${JBOSS_CONFIGDIR}/${JBOSS_INSTANCE}/jmx.access"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote.ssl=false"
JAVA_OPTS="$JAVA_OPTS -Dcom.sun.management.jmxremote"
---
In JConsole and VisualVM the jmx-mbeans of my war are visible - but for some reason
these mbeans cannot be mapped in snmp-adaptor.sar.
(see attributes.xml snippet below)
I can see the following output in the jboss server.log when fetching the value by invoking snmpwalk
(snmpwalk -v 2c -On -c public localhost:1161 .1.3.6.1.4.1.4952.100.200.1.1):
---
15:38:07,176 WARN [SnmpAgentService] getValueFor (foobar:name=NachrichtenVerarbeitung, DatensatzLaufzeit: javax.management.InstanceNotFoundException: foobar:name=EinarbeitungsnachrichtVerarbeitung is not registered.
---
Other mbeans (i.e. datasource jmx attributes) which are only visible in jmx-console (and not in jconsole)
can be successfully mapped by snmp-adaptor.sar.
It seems that this problem is caused by some type of scopeing - what can i do to make the
mbeans of a war-application visible to snmp-adaptor.sar?
Best regards
Marc Schoechlin
Details:
-----------------------------------------------------------------------------------------------------------------------------------
The spring descriptor:
--
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd">
<!-- Mbeans zur statistischen Auswertung via JMX exportieren -->
<bean id="exporter" class="org.springframework.jmx.export.MBeanExporter"
lazy-init="false">
<property name="autodetect" value="true"></property>
<property name="namingStrategy" ref="namingStrategy"></property>
<property name="assembler" ref="assembler"></property>
</bean>
<bean id="attributeSource"
class="org.springframework.jmx.export.annotation.AnnotationJmxAttributeSource" />
<bean id="assembler"
class="org.springframework.jmx.export.assembler.MetadataMBeanInfoAssembler">
<property name="attributeSource" ref="attributeSource" />
</bean>
<bean id="namingStrategy"
class="org.springframework.jmx.export.naming.MetadataNamingStrategy">
<property name="attributeSource" ref="attributeSource" />
</bean>
</beans>
---
attributes.xml snippet
---
<mbean name="foobar:name=NachrichtenVerarbeitung" oid-prefix=".1.3.6.1.4.1.4952.100.200.2">
<attribute name="DatensatzLaufzeit" oid=".1"/>
<attribute name="DatesaetzeProStunde" oid=".2"/>
<attribute name="Fehleranzahl" oid=".3"/>
<attribute name="MessageCount" oid=".4"/>
<attribute name="MessageTime" oid=".5"/>
</mbean>
---
16 years, 4 months
[JBoss AOP Development] New message: "ExtraClassPoolFactoryParameters"
by Flavia Rainone
User development,
A new message was posted in the thread "ExtraClassPoolFactoryParameters":
http://community.jboss.org/message/532386#532386
Author : Flavia Rainone
Profile : http://community.jboss.org/people/flavia.rainone@jboss.com
Message:
--------------------------------------------------------------
As part of https://jira.jboss.org/jira/browse/JBAOP-772 I've been cleaning up JBoss AOP code by removing any old classpool leftover that I can find.
During this process, I found this ExtraClassPoolFactoryParameter class. It has a warning in the javadoc telling that it should not be deleted:
/**
* This class is used by the AS5 integration. Do not delete!!!!
*
* @author <a href="kabir.khan(a)jboss.com">Kabir Khan</a>
* @version $Revision: 1.1 $
*/
public class ExtraClassPoolFactoryParameters
But, taking a look at the way this class is being used, it looks like there is something missing, as this is all I can find:
public class VFSClassLoaderScopingPolicy implements AOPClassLoaderScopingPolicyWithRegistry
{
...
public void registerClassLoader(Module module, ClassLoader loader)
{
//Need to pass some data through to the classpoolfactory here
Map<Object, Object> properties = new HashMap<Object, Object>();
//The module is needed by the JBoss5ClassPoolFactory, the legacy JBossClassPoolFactory will ignore this
properties.put(Module.class, module);
ExtraClassPoolFactoryParameters.pushThreadProperties(properties);
try
{
AspectManager.instance().registerClassLoader(loader); //Ends up in classpool factory create method
}
finally
{
ExtraClassPoolFactoryParameters.popThreadProperties();
}
}
}
I can't find any calls to ExtraClassPoolFactoryParameters.peekThreadProperties. Is this class really being used? Where?
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/532386#532386
16 years, 4 months