I have put it into JIRA at least:
http://jira.jboss.com/jira/browse/JBAS-3859
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3987048#3987048
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3987048
Hi,
I couldn't find anything in JIRA for this ... so I don't know if it's a bug, or
a 'to do' (or if I misunderstood how it is supposed to work).
It's easy to reproduce, just by editing the persistence service sar file's
jboss-service.xml file and adding one [value] XML tag.
Chris
View the
Hi,
In the source code for AbstractMBeanInvoker I see the following:
public void setAttribute(Attribute attribute) throws
AttributeNotFoundException,
InvalidAttributeValueException, MBeanException, ReflectionException
{
// TODO: __JBOSSMX_INVOCATION
Could this explain why it
Hi,
I simply deployed the docs/examples/jmx/persistent-service.sar
Then in changing deploy/persistent-service.sar/META-INF/jboss-service.xml file
all I did was added one [value] tag to the xmbean 'SomeString' attribute (as
per previous post, deploys without error).
I made no other changes,
Hi,
Are you sure that this setting of default values works?
I have tried deploying the PersistentServiceExample and changing the
META-INF/jboss-service.xml file using both suggestions from the Wiki (see the
changes I made, below).
In both cases when JBoss restarts and I look in the
If I change the xmbean attribute for SomeString to read only, then I also do
not see any error in the log from even attempting to set the now read-only
[value] I specify.
(If I instead then try to change the mbean attribute, outside the xmbean tag,
[attribute
I spoke too soon in solving one problem I created another ...
I only want the attribute to be set upon the first ever deployment. Then, when
a value changes, it is stored in XML in the xmbean-attrs/ directory so that
when JBoss restarts it always loads the last known value.
But if I set
Hi,
I've tried this, and I must have got something wrong ... I have tried 2 ways
(below) and either way my values are ignored.
Option 1.
[xmbean]
[attribute access='read-write' getMethod='getId' setMethod='setId']
[description]MBean Attribute.[/description]
Hi,
The Wiki just describes what I did in option 2. - or suggests a new syntax
which is to wrap my value in option 1. with a [value] XML tag.
Neither of which work.
Chris
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3983892#3983892
Reply to the post :
Hi,
I -think- I can get 2. working by creating a new attribute tag outside the
[xmbean] tag:
[attribute name=Id]$Id[/attribute]
so that now leaves 1. and 3.
Chris
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3983514#3983514
Reply to the post :
Hi,
Three final problems before I have this working 100%.
1. Classloader.
I have all my code neatly contained in a .war package.
Now, when I use the Deployment Service it creates an independent XML
service file in the deploy/ directory. JBoss cannot then find my
MBean class file to load it.
(ok, the XML in my post wasn't escaped, so I'll try that bit again ... the
default value I pass in like this
lt;attribute access='read-only' getMethod='getId' setMethod='setId'gt;
lt;descriptiongt;MBean Attribute.lt;/descriptiongt;
lt;namegt;Idlt;/namegt;
Just to let you know ... it worked exactly as expected and has solved my
problem. I'm impressed with the DeploymentService approach.
The only issue I have now is that, after my MBean has finished and I call
destroy(), I want it to self-destruct and delete itself from the deploy/
directory .
What haven't you thought of ? !
Many many thanks ...
View the original post :
http://www.jboss.com/index.html?module=bbop=viewtopicp=3983017#3983017
Reply to the post :
http://www.jboss.com/index.html?module=bbop=postingmode=replyp=3983017
___
ok ...
My code just doesn't work then and I have no idea why.
As a test I used twiddle to print out the mbean info into an xml file.
Then I copied the persistent descriptor section from the JBoss persistent
example sar directory into this same file.
I changed my code to read this XML file in
Hi,
When JBoss restarts, is there a way to get it to automatically redeploy any
(dynamic) mbeans that were previously running? (My MBeans are -not- physically
deployed into the deploy/ directory).
I'm using a scheduler to dynamically create and register one-to-many instances
of an mbean into
Thanks for the info, this experimental feature sounds interesting ...
So, I need to do the following:
1. deploy the Deployment Service file found here:
$JBOSS_HOME/docs/examples/varia/deployment-service/deployment-service.sar
(keeping the default settings)
2a. create a template file(s) for my
Hi,
When I use the twiddle command
$JBOSS_HOME/bin/twiddle.sh xmbean mydomain.com:job=MyJob,id=xxx
I get to see the XML config file for my dynamically generated MBean (nice).
Interestingly I see everything (operations, notifications, attributes) that
JBoss has picked up from my MBean
It didn't work (running store() method), but I guess that when I do get all
this working the load and store are done automatically by JBoss since I set a
Persistence Manager in my descriptor ...
XMBeans .. can specify a PersistenceManager (PM) that is used during XMBean
instantiation to load
Thanks for the pointer ... I made some progress, I think.
Before I had my plain MBean registered and invokable.
Now, trying to use it as an XMBean, I have some kind of MBean registered which
is not my class, and it has no methods/parameters to invoke/change.
I had expected it to just be like a
Hi,
Further progress ... I managed to now get it registered as an XMBean.
But I'm b*ggered if I know how this auto-persistence is supposed to work ...
When you change an attribute in your XMBean using the jmx-console, shouldn't it
now write something to
The problem I have is that I can't find code examples, all references I have
found so far refer to thee descriptors being changed: e.g.
If you want to load an existing Standard MBean as an XMBean then you
obviously need to write an xmbean descriptor
So, you don't need to change the Java
Hi,
How can I persist my mbean's attributes and also get them to restart when JBoss
restarts?
I'm *not* physically creating my MBeans and dropping them into the deploy/
directory.
Instead I'm dynamically creating one-to-many instances of the same MBean, as
follows:
MyClass mBean =
Thanks for the reply.
I've been searching the forums and web - and XMBeans does seem the way to go,
but all the posts I have seen refer to setting the persistence within the
descriptor (which of course I don't have). Doing the same thing 'in code' is a
completely different kettle of fish, and
24 matches
Mail list logo