[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
****
#Pool Pool
****
#PoolConfiguration PoolConfiguration
***
#Statistics Statistics
**
#Implementation Implementation
***
#Operations_228961 Operations
****
#Pool_881375 Pool
****
#PoolConfiguration_804720 PoolConfiguration
***
#Statistics_475894 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. Pool
|| *Operation
* || *Description* ||
| flush | Flushes the pool for idle connections |
| flush(boolean) | Flushes the pool for either idle connections (false) or the entire pool (true) |
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. Pool
Access can be done directly on the reference.
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 |
| AverageCreationTime | The average time spent on creating a physical connection |
| CreatedCount | The created count |
| DestroyedCount | The destroyed count |
| MaxCreationTime | The maximum time spent on creating a physical connection |
| 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 |
| TotalCreationTime | The total time spent creating physical 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 AS7 Development] - Re: Thoughts on filesystem action driven hot deployment
by Dimitris Andreadis
Dimitris Andreadis [http://community.jboss.org/people/dimitris] created the discussion
"Re: Thoughts on filesystem action driven hot deployment"
To view the discussion, visit: http://community.jboss.org/message/593490#593490
--------------------------------------------------------------
> Is it worth making it the default scanner in our next release?
I'd say let's experiment a bit first.
Just for aesthetics, I think the informative markers should be called: deploying, deployed/failed, undeploying, undeployed.
Then, the removal of the packed archive makes for a more symmetrical trigger, too. Do you know if that causes any resource/class-loading issues in the unpacked case? If this is so, maybe removing the .deployed descriptor is a preferred trigger, but that should delete the deployment, too.
I'm not set about the redeploy trigger. Maybe touching the .deployed descriptor is a good option, after all.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/593490#593490]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months
[JBoss AS7 Development] - CLI Batch Mode
by Alexey Loubyansky
Alexey Loubyansky [http://community.jboss.org/people/aloubyansky] created the document:
"CLI Batch Mode"
To view the document, visit: http://community.jboss.org/docs/DOC-16728
--------------------------------------------------------------
h2. Prototype of the batch mode
The batch mode allows to group commands and operations and execute them altogether as an atomic unit, i.e. if at least one of the commands or operations failed, all the other successfully executed commands and operations in the batch are rolled back.
Not all of the commands are allowed in the batch. E.g. commands like 'cd', 'ls', 'help', etc are not allowed in the batch since they don't translate into operation requests. Only the commands that translate into operation requests are allowed in the batch. The batch, actually, is executed as 'composite' operation request.
The batch mode is entered by executing command +batch+.
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch
localhost:9999 / #
/quote /quote
The '#' sign in the prompt indicates that the CLI is in the batch mode. Operations and commands like deploy, create-jms-topic, etc won't be executed immediately, instead they will be added to the current batch.
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
localhost:9999 / # create-jms-topic name=mytop
localhost:9999 / # :add-system-property(name=myprop,value=myval)
localhost:9999 / #
/quote /quote
But commands that don't translate into operation requests will be executed immediately. E.g.
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # ls
extension path subsystem deployment management-interfaces
interface socket-binding-group
localhost:9999 / # cd subsystem=web
localhost:9999 web #
/quote /quote
To see the list of the commands and operations in the current batch execute list-batch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # list-batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#2 create-jms-topic name=mytop
#3 /:add-system-property(name=myprop,value=myval)
/quote /quote
If you want to edit a line in the batch, use edit-batch-line command by providing the line number as the first argument and the edited command as the second one
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # edit-batch-line 2 create-jms-topic name=mytopic
localhost:9999 / # list-batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#2 create-jms-topic name=mytopic
#3 /:add-system-property(name=myprop,value=myval)
/quote /quote
If you want to re-order the lines in the batch you can do this using move-batch-line by specifying the command number you want to move as the first argument and its new position as the second argument
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # move-batch-line 3 1
localhost:9999 / # list-batch
#1 /:add-system-property(name=myprop,value=myval)
#2 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
#3 create-jms-topic name=mytopic
/quote /quote
You can remove a line using remove-batch-line and specifying the line number of the command in the batch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # remove-batch-line 2
localhost:9999 / # list-batch
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
/quote /quote
You can postpone batch editing if suddenly you want to perform some other tasks by executing holdback-batch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # holdback-batch
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 /
/quote /quote
To return to the held back batch, just execute batch command
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch
Re-activated batch
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
/quote /quote
Actually, it's possible to hold back more than one batch by adding an argument to holdback-batch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # holdback-batch mybatch
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 /
/quote /quote
Now, the batch was saved under the name 'mybatch'. To activate it, you now have to execute 'batch mybatch'. Executing just 'batch' will start a new batch.
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch
localhost:9999 / # deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
localhost:9999 / # holdback-batch
/quote /quote
Now there are two batches held back. Too see the list of all the held back batches, execute batch with '-l' switch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch -l
mybatch
/quote /quote
The unnamed batch (there can be only one unnamed batch) is activated by just executing batch command
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch
Re-activated batch
#1 deploy ../../../../testsuite/smoke/target/deployments/test-deployment.sar
localhost:9999 / #
/quote /quote
You can discard the currently active batch by executing discard-batch
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
localhost:9999 / # discard-batch
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch -l
mybatch
/quote /quote
Note, that after you re-activate your batch it is removed from the held back list and not associated with any name anymore. So, if you want to hold it back again, you will have to give it a new unique name or leave it unnamed.
Finally, run-batch executes the currently active batch after which the batch is automatically discarded.
http://community.jboss.org/docs/DOC-16728/quote http://community.jboss.org/docs/DOC-16728/quote
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 / batch mybatch
Re-activated batch 'mybatch'
#1 /:add-system-property(name=myprop,value=myval)
#2 create-jms-topic name=mytopic
localhost:9999 / # run-batch
The batch executed successfully.
http://community.jboss.org/docs/DOC-16728/localhost:9999 / http://community.jboss.org/docs/DOC-16728/localhost:9999 /
/quote /quote
--------------------------------------------------------------
Comment by going to Community
[http://community.jboss.org/docs/DOC-16728]
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
[JBoss Web Development] - Richfaces 3.3.3, jsf 1, 2 and jboss 4.2.3
by tuan nguyen
tuan nguyen [http://community.jboss.org/people/tuan_20070904] created the discussion
"Richfaces 3.3.3, jsf 1,2 and jboss 4.2.3"
To view the discussion, visit: http://community.jboss.org/message/600227#600227
--------------------------------------------------------------
Hi, i use Netbean 6.9.1 to build demo web application. When I press F6(Run probject ) it' Ok but i press Shift+f6(Run file ) there is some Error:
org.apache.jasper.JasperException: file:C:/Users/tuan/Documents/NetBeansProjects/WebApplication3/build/web/newjsf.jsp(9,55) PWC6188: The absolute uri: http://java.sun.com/jsf/core http://java.sun.com/jsf/core cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.JasperException: PWC6188: The absolute uri: http://java.sun.com/jsf/core http://java.sun.com/jsf/core cannot be resolved in either web.xml or the jar files deployed with this application
C:/Users/tuan/Documents/NetBeansProjects/WebApplication3/build/web/newjsf.jsp(9,55)
C:\Users\tuan\Documents\NetBeansProjects\WebApplication3\nbproject\build-impl.xml:575: Java returned: 1
BUILD FAILED (total time: 1 second)
My web.xml
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<context-param>
<param-name>org.richfaces.SKIN</param-name>
<param-value>blueSky</param-value>
</context-param>
<context-param>
<param-name>org.richfaces.CONTROL_SKINNING</param-name>
<param-value>enable</param-value>
</context-param>
<context-param>
<param-name>javax.faces.STATE_SAVING_METHOD</param-name>
<param-value>server</param-value>
</context-param>
<context-param>
<param-name>javax.faces.PROJECT_STAGE</param-name>
<param-value>Development</param-value>
</context-param>
<filter>
<display-name>RichFaces Filter</display-name>
<filter-name>richfaces</filter-name>
<filter-class>org.ajax4jsf.Filter</filter-class>
</filter>
<filter-mapping>
<filter-name>richfaces</filter-name>
<servlet-name>Faces Servlet</servlet-name>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
<dispatcher>INCLUDE</dispatcher>
</filter-mapping>
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>/faces/*</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
<url-pattern>*.jsf</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>faces/welcomeJSF.jsp</welcome-file>
</welcome-file-list>
</web-app>
my Lib: commons-beanutils-1.8.3,
commons-collections-3.2.1,
commons-digester-2.1,
commons-logging-1.1.1
richfaces-api-3.3.3.Final,
richfaces-impl-3.3.3.Final,
richfaces-impl-jsf2-3.3.3.Final,
richfaces-ui-3.3.3.Final
JSTL1.1-standard
JSTL 1.1-jstl
Sorry my englist not good.
Thank for help!
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/600227#600227]
Start a new discussion in JBoss Web Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&cont...]
13 years, 8 months