[IronJacamar Development] - IronJacamar Management
by Jesper Pedersen
Jesper Pedersen [http://community.jboss.org/people/jesper.pedersen] modified the document:
"IronJacamar Management"
To view the document, visit: http://community.jboss.org/docs/DOC-16674
--------------------------------------------------------------
h1. IronJacamar management
The goal of this page is to describe the management features of the IronJacamar container, the design and key implementation classes.
*
#IronJacamar_management IronJacamar management
**
#Requirements Requirements
**
#Design Design
***
#ManagementRepository ManagementRepository
***
#Connector Connector
***
#Resource_Adapter Resource Adapter
***
#Connection_Factory Connection Factory
***
#ManagedConnectionFactory ManagedConnectionFactory
***
#AdminObject AdminObject
***
#ConfigProperty ConfigProperty
***
#DataSource DataSource
**
#Features Features
***
#Operations Operations
****
#PoolConfiguration PoolConfiguration
***
#Statistics Statistics
**
#Implementation Implementation
***
#Operations_973904 Operations
****
#PoolConfiguration_671956 PoolConfiguration
***
#Statistics_755075 Statistics
****
#PoolStatistics PoolStatistics
**
#Test_suite Test suite
**
#JDBC JDBC
**
#Related Related
h2. Requirements
The overall requirements are
* Show the configuration of deployed resource adapters and datasources
* Show statistics for resource adapters and datasources
* Apply changes to the configuration of deployed resource adapters and datasources
* Invoke operations on the deployed resource adapters and datasources
h2. Design
We should a central place where the management view of resource adapters and datasources are registered (ManagementRepository).
This repository provides access to classes (Connector / DataSource) that represent a single deployment of either a resource adapter or a datasource.
Each of these classes are split into a hierarchy where information about the deployment and references to the live objects are maintained. It must be a design goal that the management classes uses methods from the public API of the IronJacamar container.
ManagementRepository
|
|- Connector
| |
| |- Resource Adapter
| |
| |- Connection Factories
| |
| |- Admin Objects
|
|- DataSource
See a description of each class below.
The implementation must be pure POJO, and only depend on the IronJacamar container.
Clients of the management repository contains the management specific technology, such as
* Java Management Extensions (JMX)
* JBoss Application Server 7 domain model
* RHQ
That way we can provide an API that can be used from all client types.
h3. ManagementRepository
|| *Method
* || *Description* ||
| getConnectors() | The active resource adapters |
| getDataSources() | The active datasources |
h3. Connector
|| *Method
* || *Description* ||
| getUniqueId() | The unique identifier for the deployment |
| getResourceAdapter() | The resource adapter |
| getConnectionFactories() | The connection factories |
| getAdminObjects() | The admin objects |
h3. Resource Adapter
|| *Method
* || *Description
* ||
| getResourceAdapter() | A reference to the live object |
| getConfigProperties() | The config-property's for the resource adapter |
| getStatistics() | A reference to the statistics module for the resource adapter |
h3. Connection Factory
|| *Method
* || *Description
* ||
| getJndiName() | The JNDI name of the connection factory |
| getConnectionFactory() | A reference to the connection factory |
| getManagedConnectionFactory() | A reference to the managed connection factory |
| getPool() | A reference to the pool |
| getPoolConfiguration() | A reference to the pool configuration |
h3. ManagedConnectionFactory
|| *Method
* || *Description* ||
| getManagedConnectionFactory() | A reference to the live object |
| getConfigProperties() | The config-property's for the managed connection factory |
| getStatistics() | A reference to the statistics module for the managed connection factory |
h3. AdminObject
|| *Method
* || *Description
* ||
| getJndiName() | The JNDI name for the admin object |
| getAdminObject() | A reference to the live object |
| getConfigProperties() | The config-property's for the admin object |
| getStatistics() | A reference to the statistics module for the admin object |
h3. ConfigProperty
|| *Method
* || *Description
* ||
| getName() | The name of the config-property |
| isDynamic() | Is the config-property dynamic - e.g. supports live updates |
| isConfidential() | Is the config-property confidential |
h3. DataSource
|| *Method
* || *Description* ||
| getJndiName() | The JNDI name of the datasource |
| isXA() | Is the datasource XA capable |
| getPool() | A reference to the pool |
| getPoolConfiguration() | A reference to the pool configuration |
h2. Features
TBD
h3. Operations
Description of the operations that can be invoked are listed below.
* "Per request" -- Once an update has been performed it will be used at the next invocation of a method which uses the property in question
* "Per container" -- Is applied once a container is started/restarted
h4. PoolConfiguration
|| *Property
* || *Read* || *Write* || *Applied* ||
| MinSize | Y | Y | Per request |
| MaxSize | Y | Y | Per request |
| BlockingTimeout | Y | Y | Per request |
| IdleTimeout | Y | Y | Per container |
| BackgroundValidation | Y | Y | Per container |
| BackgroundValidationMinutes | Y | Y | Per container |
| Prefill | Y | Y | Per container |
| StrictMin | Y | Y | Per request |
| UseFastFail | Y | Y | Per request |
h3. Statistics
Statistics should be handled through an SPI using the following two interfaces
org.jboss.jca.core.spi.statistics.Statistics
org.jboss.jca.core.spi.statistics.StatisticsPlugin
The "Statistics" interface identifies that the component in question supports statistics. The "StatisticsPlugin" interface defines the contract for the statistics module.
h2. Implementation
The implementation is located in the core module of the IronJacamar repository. The package is
org.jboss.jca.core.api.management
The implementing classes must use java.lang.ref.WeakReference for all live object references, such that won't prevent a garbage collection of the object in question.
h3. Operations
h4. PoolConfiguration
Access can be done directly on the reference.
h3. Statistics
It is possible to enable/disable statistics collection, as well as clear current values.
All statistics are read-only.
h4. PoolStatistics
|| *Property
* || *Description* ||
| ActiveCount | The active count |
| AverageBlockingTime | The average time spent blocking on a connection |
| CreatedCount | The created count |
| DestroyedCount | The destroyed count |
| MaxUsedCount | The maximum number of connections used |
| MaxWaitTime | The maximum time waiting for a connection |
| TimedOut | The timed out connections |
| TotalBlockingTime | The total time spent blocking for connections |
h2. Test suite
The management model is currently tested through the RHQ plugin.
h2. JDBC
The JDBC resource adapter has the following statistics exposed
|| *Statistics
* || *Description* ||
| PreparedStatementCacheAccessCount | The number of times that the statement cache was accessed |
| PreparedStatementCacheAddCount | The number of statements added to the statement cache |
| PreparedStatementCacheCurrentSize | The number of prepared and callable statements currently cached in the statement cache |
| PreparedStatementCacheDeleteCount | The number of statements discarded from the cache |
| PreparedStatementCacheHitCount | The number of times that statements from the cache were used |
| PreparedStatementCacheMissCount | The number of times that a statement request could not be satisfied with a statement from the cache |
h2. Related
* JBoss Application Server 7
* http://community.jboss.org/docs/DOC-16378 RHQ platform
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16674]
Create a new document in IronJacamar Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 8 months
[JBoss Messaging Development] - Unable to validate user HornetQ
by Rishi k
Rishi k [http://community.jboss.org/people/rishi321] created the discussion
"Unable to validate user HornetQ"
To view the discussion, visit: http://community.jboss.org/message/599262#599262
--------------------------------------------------------------
Hi guys,
I am using jboss AS 6 Final on ubuntu with hornetQ
I have created a new Queue on the server named Message Buffer Queue using the admin panel.
I get the following error:
Unable to validate user: guest for check type CONSUME for address jms.queue.MessageBufferQueue
Here are my files:
package org.jboss.example;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.UUID;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.QueueBrowser;
import javax.jms.QueueConnection;
import javax.jms.QueueConnectionFactory;
import javax.jms.QueueSession;
import javax.jms.Session;
import javax.naming.Context;
import javax.naming.InitialContext;
public class TestClass {
ConnectionFactory Hconnection=null;
Queue q=null;
Connection Hconn=null;
Context lContext=null;
MessageConsumer messageConsumer=null;
MessageProducer messageProducer=null;
javax.jms.Session session=null;
/**
* @param args
*/
public void sendMessagetoJMS(String sender,String receiver,String Message,String smsc,String Credit,String userid,long ctime,String savenumber)
{
int count=0;
Hashtable<String, String> ht = new Hashtable<String, String>();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
ht.put(Context.PROVIDER_URL, "127.0.0.1");
ht.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
try{
lContext = new InitialContext(ht);
Hconnection = (ConnectionFactory) lContext.lookup("ConnectionFactory");
q = (Queue) lContext.lookup("queue/MessageBufferQueue");
Hconn = (Connection) Hconnection.createConnection("guest","guest");
session = Hconn.createSession(false, Session.AUTO_ACKNOWLEDGE);
messageProducer = session.createProducer(q);
/*
* Insert into Database
*/
UUID id=UUID.randomUUID();
Hconn.start();
textmsg msg = new textmsg();
msg.setReciever(receiver);
msg.setSender(sender);
msg.setText(Message);
msg.setSmsc(smsc);
msg.setCredit(Credit);
msg.setUserid(userid);
msg.setCtime(ctime);
msg.setId(id.toString());
ObjectMessage message = session.createObjectMessage();
message.setObject(msg);
messageProducer.send(message);
System.out.println("Message sent ");
Hconn.close();
}
catch(Exception ex)
{
ex.printStackTrace();
}
}
public int getQueueSize()
{
Hashtable<String, String> ht = new Hashtable<String, String>();
ht.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
ht.put(Context.PROVIDER_URL, "127.0.0.1");
ht.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");
InitialContext ctx;
int numMsgs = 0;
try {
ctx = new InitialContext(ht);
QueueConnectionFactory connFactory = (QueueConnectionFactory) ctx.lookup("ConnectionFactory");
Queue queue = (Queue) ctx.lookup("queue/MessageBufferQueue");
QueueConnection queueConn = connFactory.createQueueConnection("guest","guest");
QueueSession queueSession = queueConn.createQueueSession(false,Session.AUTO_ACKNOWLEDGE);
QueueBrowser queueBrowser = queueSession.createBrowser(queue);
queueConn.start();
Enumeration e = queueBrowser.getEnumeration();
DateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSSSSS");;
String s=null;
while (e.hasMoreElements()) {
Message message = (Message) e.nextElement();
s = df.format(message.getJMSTimestamp());
System.out.println("=================1===================Timestamp it got to the queue"+s);
numMsgs++;
}
queueConn.close();
} catch (Exception e1) {
// TODO Auto-generated catch block
System.out.println(e1.getMessage());
}
return numMsgs;
}
public static void main(String[] args) {
int i = 0;
TestClass tc = new TestClass();
System.out.println(tc.getQueueSize());
tc.sendMessagetoJMS("jk", "gv", "Hey there", "somesmsc", "34", "thedon", 234233634, "2423487");
System.out.println(tc.getQueueSize());
}
}
My
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/599262#599262]
Start a new discussion in JBoss Messaging Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss AS7 Development] - Module Inventory
by David Lloyd
David Lloyd [http://community.jboss.org/people/dmlloyd] modified the document:
"Module Inventory"
To view the document, visit: http://community.jboss.org/docs/DOC-16710
--------------------------------------------------------------
A full inventory of all modules in the application server. Each module has a status: private, public, or included.
* +public+ - the module is available to be explicitly imported via manifest or descriptor.
* +private+ - the module is hidden from deployments and can only be imported by our shipped modules.
* +included+ - the module is public and is automatically added to deployments (todo: break this down by deployment "type"?).
|| *Module Name
* || *Status* || *Justification* ||
| asm.asm |
|
|
| ch.qos.cal10n |
|
|
| com.google.guava |
|
|
| com.h2database.h2 |
|
|
| com.sun.httpserver |
|
|
| com.sun.jsf-impl |
|
|
| com.sun.xml.bind |
|
|
| com.sun.xml.messaging.saaj |
|
|
| javaee.api | Aggregate |
|
| javax.activation.api | Included | EE APIs are included |
| javax.annotation.api | Included | EE APIs are included |
| javax.api | Included | SE API is included |
| javax.ejb.api | Included | EE APIs are included |
| javax.el.api | Included | EE APIs are included |
| javax.enterprise.api | Included | EE APIs are included |
| javax.enterprise.deploy.api | Included | EE APIs are included |
| javax.faces.api | Included | EE APIs are included |
| javax.inject.api | Included | EE APIs are included |
| javax.interceptor.api | Included | EE APIs are included |
| javax.jms.api | Included | EE APIs are included |
| javax.jws.api | Included | EE APIs are included |
| javax.mail.api | Included | EE APIs are included |
| javax.persistence.api | Included | EE APIs are included |
| javax.resource.api | Included | EE APIs are included |
| javax.security.auth.message.api | Included | EE APIs are included |
| javax.security.jacc.api | Included | EE APIs are included |
| javax.servlet.api | Included | EE APIs are included |
| javax.servlet.jsp.api | Included | EE APIs are included |
| javax.servlet.jstl.api | Included | EE APIs are included |
| javax.transaction.api | Included | EE APIs are included |
| javax.validation.api | Included | EE APIs are included |
| javax.wsdl4j.api | Included |
|
| javax.ws.rs.api | Included | EE APIs are included |
| javax.xml.bind.api | Included | EE APIs are included |
| javax.xml.jaxp-provider |
|
|
| javax.xml.registry.api | Included | EE APIs are included |
| javax.xml.rpc.api | Included | EE APIs are included |
| javax.xml.soap.api | Included | EE APIs are included |
| javax.xml.stream.api | Included | EE APIs are included |
| javax.xml.ws.api | Included | EE APIs are included |
| jline |
|
|
| net.sf.cglib |
|
|
| net.sourceforge.cssparser |
|
|
| net.sourceforge.htmlunit |
|
|
| net.sourceforge.nekohtml |
|
|
| org.antlr |
|
|
| org.apache.ant |
|
|
| org.apache.aries.jmx | private | Provides standard OSGi JMX access. The JMX access itself is public. |
| org.apache.aries.util | private | Needed by org.apache.aries.jmx. |
| org.apache.commons.codec |
|
|
| org.apache.commons.collections |
|
|
| org.apache.commons.io |
|
|
| org.apache.commons.lang |
|
|
| org.apache.commons.logging | public | Users are encouraged to use our provided log APIs |
| org.apache.cxf |
|
|
| org.apache.felix.configadmin |
|
|
| org.apache.httpcomponents |
|
|
| org.apache.james.mime4j |
|
|
| org.apache.log4j | public | Users are encouraged to use our provided log APIs |
| org.apache.neethi |
|
|
| org.apache.santuario.xmlsec |
|
|
| org.apache.ws.commons.xmlschema |
|
|
| org.apache.ws.security |
|
|
| org.apache.xalan |
|
|
| org.apache.xerces |
|
|
| org.codehaus.woodstox |
|
|
| org.dom4j |
|
|
| org.hibernate |
|
|
| org.hibernate.validator |
|
|
| org.hornetq |
|
|
| org.javassist |
|
|
| org.jboss.arquillian.api |
|
|
| org.jboss.arquillian.impl |
|
|
| org.jboss.arquillian.junit |
|
|
| org.jboss.arquillian.protocol.jmx |
|
|
| org.jboss.arquillian.protocol.osgi |
|
|
| org.jboss.arquillian.spi |
|
|
| org.jboss.arquillian.testenricher.cdi |
|
|
| org.jboss.arquillian.testenricher.jmx |
|
|
| org.jboss.arquillian.testenricher.msc |
|
|
| org.jboss.arquillian.testenricher.osgi |
|
|
| org.jboss.arquillian.testenricher.resource |
|
|
| org.jboss.as.aggregate | aggregate (private) |
|
| org.jboss.as.arquillian.common | private |
|
| org.jboss.as.arquillian.protocol.servlet | private |
|
| org.jboss.as.arquillian.service | private |
|
| org.jboss.as.cli | private |
|
| org.jboss.as.clustering | private |
|
| org.jboss.as.connector | private |
|
| org.jboss.as.controller-client | public (?) |
|
| org.jboss.as.controller | private |
|
| org.jboss.as.deployment-repository | private |
|
| org.jboss.as.deployment-scanner | private |
|
| org.jboss.as.domain-controller | private |
|
| org.jboss.as.domain-http-api | public (?) |
|
| org.jboss.as.ee | private |
|
| org.jboss.as.ejb3 | private |
|
| org.jboss.as.example-bootstrap | private |
|
| org.jboss.as.host-controller | private |
|
| org.jboss.as.jaxrs | private |
|
| org.jboss.as.jmx | private |
|
| org.jboss.as.jpa | private |
|
| org.jboss.as.logging | private |
|
| org.jboss.as.messaging | private |
|
| org.jboss.as.naming | private |
|
| org.jboss.as.osgi.configadmin | private |
|
| org.jboss.as.osgi | private |
|
| org.jboss.as.process-controller | private |
|
| org.jboss.as.protocol | private |
|
| org.jboss.as.remoting | private |
|
| org.jboss.as.sar | private |
|
| org.jboss.as.security | private |
|
| org.jboss.as.server | private |
|
| org.jboss.as.standalone | private |
|
| org.jboss.as.threads | private |
|
| org.jboss.as.transactions | private |
|
| org.jboss.as.web | private |
|
| org.jboss.as.webservices | private |
|
| org.jboss.as.webservices.server.integration | private |
|
| org.jboss.as.weld | private |
|
| org.jboss.classfilewriter |
|
|
| org.jboss.common-core | private | This module should be deprecated. |
| org.jboss.deployers.jboss-service-deployer |
|
|
| org.jboss.dmr | public |
|
| org.jboss.ejb3 |
|
|
| org.jboss.integration.jboss-jca-spi |
|
|
| org.jboss.integration.jboss-transaction-spi |
|
|
| org.jboss.interceptor |
|
|
| org.jboss.interceptor.spi |
|
|
| org.jboss.invocation | public |
|
| org.jboss.ironjacamar.api |
|
|
| org.jboss.ironjacamar.impl |
|
|
| org.jboss.ironjacamar.jdbcadapters |
|
|
| org.jboss.jandex |
|
|
| org.jboss.jsfunit.arquillian |
|
|
| org.jboss.jsfunit.core |
|
|
| org.jboss.jsfunit.jsfunit-arquillian-processor |
|
|
| org.jboss.jts.integration |
|
|
| org.jboss.jts |
|
|
| org.jboss.logging | public | Users are encouraged to use our provided log APIs |
| org.jboss.logmanager.log4j |
|
|
| org.jboss.logmanager |
|
|
| org.jboss.marshalling | public |
|
| org.jboss.marshalling.river | public |
|
| org.jboss.metadata |
|
|
| org.jboss.modules | public |
|
| org.jboss.msc | public |
|
| org.jboss.netty |
|
|
| org.jboss.osgi.common | private | JBoss OSGi bundle for common functionality |
| org.jboss.osgi.deployment | private | JBoss OSGi deployment support |
| org.jboss.osgi.framework | private | JBoss OSGi Core Framework. API in org.osgi.core module. |
| org.jboss.osgi.jmx | private | JBoss OSGi Management Extension |
| org.jboss.osgi.resolver | private | A standalone OSGi Resolver |
| org.jboss.osgi.spi | private | JBoss OSGi Service Provider Interface (SPI) |
| org.jboss.osgi.vfs | private | JBoss OSGi Virtual File System |
| org.jboss.remoting3 | public |
|
| org.jboss.resteasy.async-http-servlet-30 |
|
|
| org.jboss.resteasy.resteasy-cdi |
|
|
| org.jboss.resteasy.resteasy-jaxb-provider |
|
|
| org.jboss.resteasy.resteasy-jaxrs |
|
|
| org.jboss.shrinkwrap.api |
|
|
| org.jboss.shrinkwrap.impl |
|
|
| org.jboss.shrinkwrap.spi |
|
|
| org.jboss.staxmapper |
|
|
| org.jboss.stdio |
|
|
| org.jboss.surefire.arquillian-deps |
|
|
| org.jboss.surefire.arquillian-jsfunit-deps |
|
|
| org.jboss.threads | public |
|
| org.jboss.vfs | public | It has been argued that this should be "included" so that deployments using Spring work out of the box. |
| org.jboss.weld.api |
|
|
| org.jboss.weld.core |
|
|
| org.jboss.weld.spi |
|
|
| org.jboss.ws.api |
|
|
| org.jboss.ws.common |
|
|
| org.jboss.ws.cxf.jbossws-cxf-factories |
|
|
| org.jboss.ws.cxf.jbossws-cxf-server |
|
|
| org.jboss.ws.cxf.jbossws-cxf-transports-httpserver |
|
|
| org.jboss.ws.jaxws-client |
|
|
| org.jboss.ws.jaxws-httpserver-httpspi |
|
|
| org.jboss.ws.spi |
|
|
| org.jboss.xnio | public |
|
| org.jboss.xnio.nio |
|
|
| org.jgroups |
|
|
| org.junit |
|
|
| org.osgi.compendium | public | Provides APIs from the OSGi compendium specifications for bundles using OSGi compendium services. |
| org.osgi.core | public | Provides APIs from the OSGi core specifications for people developing OSGi bundles. |
| org.picketbox |
|
|
| org.scannotation.scannotation |
|
|
| org.slf4j.ext |
|
|
| org.slf4j.impl |
|
|
| org.slf4j.jcl-over-slf4j |
|
|
| org.slf4j | public | Users are encouraged to use our provided log APIs |
| org.w3c.css.sac |
|
|
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16710]
Create a new document in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=102&co...]
13 years, 8 months