This topic is going to discuss one facet of the integration between the  JBoss 
Application Server and the Admin Console. Any constructive feedback or 
suggestions on the issues I raise below would be most welcome.

In summary, the first releases of the Admin Console will focus on providing a 
web-based client that will allow users to review and update various common 
services in a single instance of JBoss AS. Example features are the ability to 
create/read/update/delete datasources, manage JMS settings and 
create/read/update and delete destinations.

The architecture for the application will be as follows:

1) Web-tier. A typical web-app, nothing scary or overly elaborate. Another post 
will describe the particular framework that will be used.

2) Integration between web-tier and JBoss AS. Planned to be a straightforward 
interface based service layer, with POJO implementations allowing full 
unit/integration testing of the back-end without any dependency on the web UI.

3) JBoss AS. [The topic of this post]. I'm referring here to the facilities 
currently available or to be developed within the JBoss AS that will enable the 
Admin Console to do its job. In more detail...


One of the more obvious requirements for the Admin Console is that changes to 
settings made through it must persist across restarts of the JBoss AS instance. 
AFAIK we really have two possible options when dealing with persistence of 
configuration changes:

1) Assuming all interesting settings are available via JMX we could just make 
"everything" an XMBean (http://jboss.org/wiki/Wiki.jsp?page=XMBean). 
In theory this would allow you to make changes directly via JMX and those 
changes would be persisted transparently for us by the Persistence Service 
(http://www.jboss.org/wiki/Wiki.jsp?page=XMBeanAttributePersistenceService). 
Unfortunately it is not possible to make every MBean an XMBean, for example 
Tomcat creates MBeans programmatically which we can't get at. Also Dimitris 
points out here 
(http://www.jboss.org/wiki/Wiki.jsp?page=ExtentionsToJBoss32xDeploymentLayer) 
that he ran into problems making MBeans that generate or consume notifications 
into XMBeans. Finally using any form of MBean persistence will break the link 
to the underlying configuration, e.g blah-ds.xml. Once a change has been made 
to an XMBean the version kept in the persistent store always wins over the 
configuration .xml file.

2) Use the DeploymentService 
(http://www.jboss.org/wiki/Wiki.jsp?page=DeploymentService) to update the 
actual configurations in the ./deploy directory. This service enables clients 
to generate fresh configuration packages using Velocity templates. Attributes 
can be passed in and will be inserted into the appropriate place in a .xml 
configuration file. The configuration package will then be copied into 
./deploy. The tricky part is where to get the current configuration settings 
from in order to display them in the Admin Console?. Again there seems to be 
two options:

i) Via JMX? This is not always straightforard. For example, how do I get a list 
of installed Datasources, making sure to avoid any other JCA Managed Connection 
Factories which have nothing to do with a database?
ii) Via parsing the configuration files? The flexibility offered when 
configuring services would make the task of parsing the xml tough, right?

Is the best solution for fixing 2) just to give the Admin Console its own 
database? So when it first starts it doesn't know of any deployed services. But 
after you have created, say, a datasource through the Admin Console, it will 
remember the settings, so that when you come back to the Admin Console to view 
the datasource it will display the "correct" values. I say"correct" here to 
highlight the fact that this solution will not be aware of changes to the 
configuration made directly in the .xml. It will only know of changes made 
through the console itself. Is this an acceptable option? If not, do you have 
any ideas for a better alternative?

Thanks for your time
Charles


View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3862508#3862508

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3862508


-------------------------------------------------------
The SF.Net email is sponsored by: Beat the post-holiday blues
Get a FREE limited edition SourceForge.net t-shirt from ThinkGeek.
It's fun and FREE -- well, almost....http://www.thinkgeek.com/sfshirt
_______________________________________________
JBoss-Development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to