[Design of JMX on JBoss (JBoss/JMX)] - my first JMX
by anand_anan2k
Hi All,
I'm new to JMX and got some basic questions related to deployment of Mbeans and registering of mbeans.
Got some code for mbean.
Mbean interface :
public interface HelloMBean {
public void sayHello();
public int add(int x, int y);
public String getName();
public int getCacheSize();
public void setCacheSize(int size);
}
mbean implementation :
public class Hello implements HelloMBean {
public void sayHello() {
System.out.println("hello, world");
}
public int add(int x, int y) {
return x + y;
}
public String getName() {
return this.name;
}
public int getCacheSize() {
return this.cacheSize;
}
public synchronized void setCacheSize(int size) {
this.cacheSize = size;
System.out.println("Cache size now " + this.cacheSize);
}
private final String name = "Reginald";
private int cacheSize = DEFAULT_CACHE_SIZE;
private static final int DEFAULT_CACHE_SIZE = 200;
}
Now , i would like to know , how to deploy the above code in JBOSS server and make the mbean register.
Are there any descriptor and i need to update , so that jboss will invoke the mbean registering function and the startup.
And please let me know , how i can lookup those mbean services.
Thanks,
Elangovan.
Hello.java
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134730#4134730
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134730
18 years, 1 month
[Design of JBoss Build System] - maven-buildmagic-thirdparty-plugin Enhancements to put in re
by ALRubinger
As it currently stands, the jboss-deploy-plugin (now the maven-buildmagic-thirdparty-plugin - love the clearer name BTW), copies artifacts from "mvn deploy" into the path specified by "jboss.repository.root", intended to be the target for the local WC of https://svn.jboss.org/repos/repository.jboss.com.
Which is fine for local dev, but for QA environments where we don't have access to do an "svn ci" to the thirdparty repo after "mvn deploy", there's currently no way to get the artifacts into 3rdparty via a cron'd Hudson run.
So the end result is that we must manually deploy artifacts each night such that they're kept current for AS builds, and stuff easily falls out of sync. QA asked me about this today specifically for the EJB3 Aggregator run.
How can we change this? Some ideas:
* Enhance maven-buildmagic-thirdparty-plugin to automatically invoke appropriate SVN actions (either via Process to 'svn' or Java SVN lib)
* Enhance maven-buildmagic-thirdparty-plugin to WebDAV the necessary artifacts and descriptors artifacts, overwriting what's there (Apache Slide, maybe). This solution is simpler but won't account for version control (in SVN anyway, I'm not sure what's hooked up under the DAV protocol supporting that location now).
* Do nothing; Paul will be done with making 3rdparty go the way of the Dodo soon enough and everything will be in the Maven2 repos.
Thoughts?
S,
ALR
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134729#4134729
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134729
18 years, 1 month
[Design of POJO Server] - Re: Deploying Ears and Wars through ProfileService
by scott.stark@jboss.org
The jsr88 api has decent status object for its deployment api:
javax.enterprise.deploy.spi.status.ProgressObject:
| public interface ProgressObject
| {
| // Constants -----------------------------------------------------
|
| // Public --------------------------------------------------------
|
| /**
| * Retrieve the status of the deployment
| *
| * @return the status
| */
| DeploymentStatus getDeploymentStatus();
|
| /**
| * Retrieve the resulting target module ids
| *
| * @return the module ids
| */
| TargetModuleID[] getResultTargetModuleIDs();
|
| /**
| * Return the client configuration associated with the module
| *
| * @param id the module id
| * @return the client configuration or null if none exists
| */
| ClientConfiguration getClientConfiguration(TargetModuleID id);
|
| /**
| * Is cancel supported
| *
| * @return true when cancel is supported, false otherwise
| */
| boolean isCancelSupported();
|
| /**
| * Cancels the deployment
| *
| * @throws OperationUnsupportedException when cancel is not supported
| */
| void cancel() throws OperationUnsupportedException;
|
| /**
| * Is stop supported
| *
| * @return true when stop is supported, false otherwise
| */
| boolean isStopSupported();
|
| /**
| * Stops the deployment
| *
| * @throws OperationUnsupportedException when stop is not supported
| */
| void stop() throws OperationUnsupportedException;
|
| /**
| * Add a progress listener
| *
| * @param listener the listener
| */
| void addProgressListener(ProgressListener listener);
|
| /**
| * Remove a progress listener
| *
| * @param listener the listener
| */
| void removeProgressListener(ProgressListener listener);
| }
|
We would drop the getClientConfiguration. TargetModuleID,DeploymentStatus,Target are:
| public interface TargetModuleID
| {
| // Constants -----------------------------------------------------
|
| // Public --------------------------------------------------------
|
| /**
| * Get the target
| *
| * @return the target
| */
| Target getTarget();
|
| /**
| * Get the module id
| *
| * @return the id
| */
| String getModuleID();
|
| /**
| * The URL for a web module
| *
| * @return the url
| */
| String getWebURL();
|
| /**
| * Return the identifier of this module
| *
| * @return the identifier
| */
| String toString();
|
| /**
| * The parent of this module
| *
| * @return the parent or null if there is no parent
| */
| TargetModuleID getParentTargetModuleID();
|
| /**
| * Get the child modules
| *
| * @return an array of child modules or null if there are no children
| */
| TargetModuleID[] getChildTargetModuleID();
| }
| public interface DeploymentStatus
| {
| // Constants -----------------------------------------------------
|
| // Public --------------------------------------------------------
|
| /**
| * Get the state of the deployment
| *
| * @return the state
| */
| StateType getState();
|
| /**
| * The deployment command
| *
| * @return the command
| */
| CommandType getCommand();
|
| /**
| * The action of this deployment
| *
| * @return the action
| */
| ActionType getAction();
|
| /**
| * Get the message
| *
| * @return the message
| */
| String getMessage();
|
| /**
| * Is the deployment complete
| *
| * @return true when complete, false otherwise
| */
| boolean isCompleted();
|
| /**
| * Has the deployment failed
| *
| * @return true when failed, false otherwise
| */
| boolean isFailed();
|
| /**
| * Is the deployment in progress
| *
| * @return true when in progress, false otherwise
| */
| boolean isRunning();
| }
| */
| public interface Target
| {
| // Constants -----------------------------------------------------
|
| // Public --------------------------------------------------------
|
| /**
| * Get the target's name
| *
| * @return the name
| */
| String getName();
|
| /**
| * Get the target's description
| *
| * @return the description
| */
| String getDescription();
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134724#4134724
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134724
18 years, 1 month
[Design of EJB 3.0] - Re: EJB3 Plugin Installer; Multiplatform
by scott.stark@jboss.org
Now I'm seeing:
| Starting Ant> /usr/java/apache-ant-1.6.5\bin\ant -f C:\DOCUME~1\starksm\LOCALS~1
| \Temp\jbossas-ejb3-plugin-installer\build-install-ejb3-plugin.xml
| Exception in thread "main" java.lang.RuntimeException: Ensure Apache Ant is properly installed and Environment Variable ANT_HOME is set
| at org.jboss.ejb3.installer.Installer.runAnt(Installer.java:376)
| at org.jboss.ejb3.installer.Installer.install(Installer.java:201)
| at org.jboss.ejb3.installer.Installer.main(Installer.java:152)
| Caused by: java.io.IOException: CreateProcess: \usr\java\apache-ant-1.6.5\bin\ant -f C:\DOCUME~1\starksm\LOCALS~1\Temp\jbossas-ejb3-plugin-installer\build-install-ejb3-plugin.xml error=193
| at java.lang.ProcessImpl.create(Native Method)
| at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
| at java.lang.ProcessImpl.start(ProcessImpl.java:30)
| at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
| at org.jboss.ejb3.installer.Installer.runAnt(Installer.java:354)
| ... 2 more
| Shutdown Hook called...
| Starting Cleanup...
| Cleanup Complete.
|
the problem is that winxp does not know how to run the ant sh script. It only under a cygwin shell. I added an ANT_CMD to allow the path to be specified. That also first failed because the ant.bat file did not have its executable bit set. Once I fixed that, the plugin is running.
You would have to cactch this IOException and then try a bat extension.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134719#4134719
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134719
18 years, 1 month
[Design of JBoss Build System] - Re: Moving jbossas to a maven repo for thirdparty
by pgier
Just wanted to give an update on the progress of this. I have most of the thirdparty repo generated, now I'm trying to build against the maven generated thirdparty directory. And I'm still finding some things that don't match.
I think that by mid next week, I should have it all working. My plan is to change the main build script to call my maven thirdparty build instead of the current build-thirdparty.xml. Then the ant script won't be needed any more. At this point build-thirdparty.xml should no longer be maintained, and in order to update dependency versions everyone will have to update the parent pom and/or the thirdparty/pom.xml.
Instead of modifying the build scripts to point to "target", I discussed with Rajesh and it seems like it will be better just to generate the thirdparty output directly to the thirdparty directory and overwrite what is there now. This way the only modification needed to the build.xml files is to turn on "inhibit.downloads". And then make the call to thirdparty "mvn package" automatic just for convenience.
Does this sound reasonable?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4134713#4134713
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4134713
18 years, 1 month