[JBoss AS 7 Development] - JBoss Logging Tooling
by Hardy Ferentschik
Hardy Ferentschik [https://community.jboss.org/people/hardy.ferentschik] modified the document:
"JBoss Logging Tooling"
To view the document, visit: https://community.jboss.org/docs/DOC-16818
--------------------------------------------------------------
*+** Note:+* +This document is currently targeted at JBoss Logging 3.0.0 CR1 and JBoss Logging Tooling 1.0.0 Beta8-SNAPSHOT (the reason for the snapshot is a bug retrieving loggers from translated loggers)+.
**
#Why Why?
**
#How_does_it_work How does it work?
**
#Dependencies Dependencies
**
#Constraints Constraints
**
#Example_Code Example Code
**
#How_to_set_it_up_in_your_project How to set it up in your project?
***
#Maven Maven
****
#mavencompilerplugin maven-compiler-plugin
****
#mavenprocessorplugin maven-processor-plugin
***
#IDE IDE
****
#Eclipse Eclipse
****
#NetBeans NetBeans
****
#Intellij Intellij
**
#Issue_tracking Issue tracking
h2. Why?
If you want to internationalize (i18n) your logging, exception messages and messages in general, then along with JBoss Logging 3.x, JBoss Logging Tools is for you. It provides an easy way to offer internationalized messages, exceptions and logger messages to your project.
With JBoss Logging Tools you write interfaces and annotate the methods with a default message. Then you or a translator will create a properties file with the translated text.
h2. How does it work?
JBoss Logging Tools uses an annotation processor to implement concrete classes of your annotated interfaces. If you have also provided translation properties files, then a new concrete class will be created extending the implementation and overriding the messages returned.
The translation properties files must exist in the same directory structure as the interface. The name of the properties file +InterfaceName.i18n_language_country_variant.properties+. For example if you have a class named +org.jboss.as.As7RocksMessages+ and you want to translate this into French you create a properties file called +As7RocksMessages.i18n_fr.properties+ in a directory +org/jboss/as+.
h2. Dependencies
* JBoss Logging 3
* tools.jar or CodeModel (which can be found here http://codemodel.java.net/ http://codemodel.java.net/)
h2. Constraints
*The following annotations are defined:*
* @org.jboss.logging.MessageBundle - This annotation is attached to an interface which is intended to be a message bundle (a generic source of translated strings; i.e. there are no logging methods on the interface). Interfaces annotated with this annotation can be instantiated via the Messages.getBundle(InterfaceName.class) method.
* @org.jboss.logging.MessageLogger - This annotation is attached to an interface which is intended to act as a translating message logger. Such interfaces may include plain bundle messages as well as logger messages. Interfaces annotated with this annotation can be instantiated via the Logger.getMessageLogger(InterfaceName.class, "category.name") method.
* @org.jboss.logging.Message - this annotation is attached to any interface method which corresponds to a message which may be translated. This includes both simple messages and log messages.
* @org.jboss.logging.LogMessage - this annotation is attached to log messages (in addition to Message above), and includes additional information such as the log level for the message.
* @org.jboss.logging.Cause - this annotation is attached to a method parameter which should be considered to be the causing java.lang.Throwable (or subclass thereof).
*Message bundle interfaces must conform to these rules:*
* The message bundle annotation may specify a project code.
* All methods defined on the message bundle interface must have a @org.jboss.logging.Message annotation present, unless the method has the same name as another method on the interface and same number of parameters (minus the cause parameter) which has the annotation present.
* All methods defined on the message bundle interface must return either java.lang.String or one of its supertypes, or java.lang.Throwable or one of its subtypes.
* All methods defined on the message bundle interface must accept a number of parameters consistent with the format string on the value attribute of the @org.jboss.logging.Message annotation. This assertion is complex to ascertain at compile-time, thus the no errors are shown at compile time.
* The @org.jboss.logging.Cause annotation may appear at most once on any given method's parameter list.
* If the method returns a java.lang.Throwable, the parameter marked as @Cause is passed in to that Throwable's constructor if it has such a parameter; if not, then it is passed in to the Throwable's initCause() method after the Throwable is constructed.
* If the method returns a java.lang.Throwable the message of the Throwable will initialized with the message from the annotation if available.
* All of the @org.jboss.logging.Message annotations found on methods on all message bundle interfaces with the same project code which specify an id must specify a unique number, INHERIT, or NONE.
* A message bundle interface may extend other message bundle interfaces.
* A message bundle interface may extend java.io.Serializable; however, doing so is superfluous as the implementation class will implement this interface regardless.
* A message bundle interface may not extend any other interfaces which do not fit the criteria specified above.
*Message logger interfaces must conform to the above rules, except:*
* A message logger interface may not specify a @org.jboss.logging.MessageBundle annotation; instead, it must specify a @org.jboss.logging.MessageLogger annotation (which also has a property for project code).
* Any method on a message logger interface may additionally specify a @org.jboss.logging.LogMessage annotation. This annotation signifies that the method is a logger method.
* All logger methods must be declared to return void.
* A logger method may have a specified log level in the level property of the @LogMessage annotation.
* If multiple methods of the same name exist, any number of them may have @LogMessage annotations. Only methods so annotated are log message methods. The rules regarding equally-named methods on message bundles continue to apply.
* Log methods with a parameter marked as @Cause will pass that parameter in to the appropriate log method as the causing exception.
* Message logger interfaces may extend other message logger interfaces in addition to the rules for message bundle interfaces.
* Message logger interfaces may extend the @org.jboss.logging.BasicLogger interface. All methods of the BasicLogger will be delegated to the logger being used for the log methods.
*Parameter count rules:*
** You should be aware parameters are counted a little differently than a normal overloaded method. The parameter count used for validation is comprised of a count of all the parameters minus the *@Cause* parameter.
h2.
Example Code
More examples to come, but for now is is a source repository of examples on how to create the interfaces for loggers and message bundles.
https://github.com/jamezp/jboss-logging-example https://github.com/jamezp/jboss-logging-example
h2. How to set it up in your project?
Using the logging tool requires minimal set-up.
h3. Maven
For a maven project you are having two options
h4. maven-compiler-plugin
In this case the JBoss Logging Tool library needs to be specified as project dependency.
...
<dependencies>
...
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
<version>${jbossLoggingProcessorVersion}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<!-- Must be at least version 2.2 with a target of 1.6 to generate the source files in
target/generated-sources -->
<version>2.3.2</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<showWarnings>true</showWarnings>
<!-- Optional if you wan to generate skeleton translation properties files -->
<compilerArgument>
-AgeneratedTranslationFilesPath=${project.basedir}/target/generated-translation-files
</compilerArgument>
</configuration>
</plugin>
</plugins>
</build>
...
h4. maven-processor-plugin
In this approach the +maven-processor-plugin+ is used for running the annotation processor. The +jboss-logging-processor+ dependency is now local to the plugin and the Maven bugs http://jira.codehaus.org/browse/MCOMPILER-62 MCOMPILER-62 and http://jira.codehaus.org/browse/MCOMPILER-66 MCOMPILER-66 are avoided.
...
<plugin>
<groupId>org.bsc.maven</groupId>
<artifactId>maven-processor-plugin</artifactId>
<version>2.0.2</version>
<executions>
<!-- Run annotation processors on src/main/java sources -->
<execution>
<id>process</id>
<goals>
<goal>process</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<processors>
<processor>org.jboss.logging.generator.apt.LoggingToolsProcessor</processor>
</processors>
</configuration>
</execution>
<!-- Run annotation processors on src/test/java sources -->
<execution>
<id>process-test</id>
<goals>
<goal>process-test</goal>
</goals>
<phase>generate-test-sources</phase>
<configuration>
<processors>
<processor>org.jboss.logging.generator.apt.LoggingToolsProcessor</processor>
</processors>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.jboss.logging</groupId>
<artifactId>jboss-logging-processor</artifactId>
<version>${jbossLoggingProcessorVersion}</version>
<scope>compile</scope>
</dependency>
</dependencies>
</plugin>
...
This approach is also described on this http://in.relation.to/17636.lace blog entry on in.relation.to
h3. IDE
h4. Eclipse
When using an Eclipse project follow the instructions here http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/g... (http://help.eclipse.org/helios/index.jsp?topic=/org.eclipse.jdt.doc.isv/g...) to enable annotation processing.
h4. NetBeans
When using NetBeans as long as the library is in the class path, the annotations will automatically be processed.
h4. Intellij
Intellij IDEA offers the following documentation to enable annotation processing. http://www.jetbrains.com/idea/webhelp/compiler-annotation-processors.html (http://www.jetbrains.com/idea/webhelp/compiler-annotation-processors.html)
h2. Issue tracking
JBoss issue tracker - https://issues.jboss.org/browse/JBLOGGING JBLogging
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-16818]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[JBoss ESB Development] - sql-listener causing extremely frequent queries on database (once every 50millisec)
by Vishal Changrani
Vishal Changrani [https://community.jboss.org/people/vishal_changrani] created the discussion
"sql-listener causing extremely frequent queries on database (once every 50millisec)"
To view the discussion, visit: https://community.jboss.org/message/726482#726482
--------------------------------------------------------------
Hi,
Following is my jboss-esb.xml (ESB version 4.9) For some unknown reason the sql-listener (TxHelloSQLChannel) causes extremely frequent SQL queries being sent to the database server. Upon some investigation through the source code I realize that a "MessageAwareListener" class is created for this listener (maybe since I have not set is-gateway to true). This MessageAwareListener class has a run() method which runs once every 50 milliseconds as hardcoded in the _pauseLapseInMillis variable. It doesnt honor the schedule-frequency that I specify in the xml. Also another strange thing I observe is the my SqlGatewayListener class is not initalized for this listener (is that becuase this is not a gateway sql-listener). For the other listner 'helloSQLChannel' it is instatiated and it honors the schedule frequency.
Finally I got the ESB source code but I cannot get the package xbeanmodel.impl. Are these suppose to be downloaded from somewhere else? (they are coming from the jar jbossesb-config-model-1.0.1.jar).
Thanks in advance for all your help/comments.
<?xml version="1.0"?>
<jbossesb parameterReloadSecs="5"
xmlns=" http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml..."
xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation=" http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem... http://anonsvn.jboss.org/repos/labs/labs/jbossesb/trunk/product/etc/schem...">
<providers>
<jms-provider connection-factory="ConnectionFactory" name="JBossMQ">
<jms-bus busid="ftpGwChannel">
<jms-message-filter dest-name="queue/ftptstv_gw" dest-type="QUEUE"/>
</jms-bus>
<jms-bus busid="ftpEsbChannel">
<jms-message-filter dest-name="queue/ftptstv_esb" dest-type="QUEUE"/>
</jms-bus>
<jms-bus busid="quickstartEsbChannel">
<jms-message-filter
dest-name="queue/quickstart_sql_action_Request_esb"
dest-type="QUEUE" selector="source='fromHelloworldSQLAction'"/>
</jms-bus>
</jms-provider>
<fs-provider name="FSprovider">
<fs-bus busid="FtpChannel">
<fs-message-filter directory="${esb.ftpwatchdir}"
error-delete="false" error-directory="${esb.error}"
error-suffix=".IN_ERROR" input-suffix=".dat" post-delete="true"
post-directory="${esb.sent}" post-suffix=".sentToEsb" work-suffix=".esbWorking"/>
</fs-bus>
</fs-provider>
<sql-provider datasource="java:/myDB" name="GatewaySQLprovider" url="${esb.oracleurl}">
<sql-bus busid="helloSQLChannel">
<sql-message-filter insert-timestamp-column="TIMESTAMP_COL"
message-column="DATA_COLUMN" message-id-column="UNIQUE_ID"
order-by="DATA_COLUMN" post-delete="false"
status-column="STATUS_COL" tablename="export_gateway" where-condition="DATA_COLUMN like 'data%'"/>
</sql-bus>
</sql-provider>
<sql-provider datasource="java:/myDB" name="SQLprovider" url="${esb.oracleurl}">
<sql-bus busid="TxHelloSQLChannel">
<sql-message-filter insert-timestamp-column="TIMESTAMP_COL"
message-column="DATA_COLUMN" message-id-column="MESSAGE_ID"
status-column="STATUS_COL" tablename="TX_ESB_MESSAGES"/>
</sql-bus>
</sql-provider>
</providers>
<services>
<service category="FtpServiceESB" description="Ftp service" name="FtpListener">
<listeners>
<jms-listener busidref="ftpGwChannel" is-gateway="true" name="JMS-Gateway"/>
<jms-listener busidref="ftpEsbChannel" name="quickstart"/>
<fs-listener busidref="FtpChannel" is-gateway="true"
name="FtpGateway" poll-frequency-seconds="10">
<property name="mimeType" value="text/plain"/>
<property name="encoding" value="UTF-8"/>
</fs-listener>
</listeners>
<actions mep="OneWay">
<action class="org.jboss.soa.esb.actions.SystemPrintln" name="actionq2">
<property name="message"/>
</action>
<action class="org.jboss.soa.esb.smooks.SmooksAction" name="simple-transform">
<property name="smooksConfig" value="/smooks-res.xml"/>
</action>
<action class="org.jboss.soa.esb.actions.Notifier" name="notificationAction1">
<property name="okMethod" value="notifyOK"/>
<property name="notification-details">
<NotificationList type="ok">
<target class="NotifyConsole"/>
</NotificationList>
<NotificationList type="OK" xmlns=" http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml... http://anonsvn.labs.jboss.com/labs/jbossesb/trunk/product/etc/schemas/xml...">
<target class="NotifyFTP">
<ftp
URL=" ftp://$/ ftp://${esb.ftpuser}:${esb.ftpuserpw}@${esb.ftpserver}/" filename="${esb.ftpfilename}"/>
</target>
</NotificationList>
</property>
</action>
</actions>
</service>
<service category="SQLServiceESB"
description=" TX SQL Action (esb jdbc listener)" name="myTxListener">
<listeners>
<sql-listener busidref="helloSQLChannel" is-gateway="true"
name="SqlGateway" schedule-frequency="${esb.demandInterval}"/>
<sql-listener busidref="TxHelloSQLChannel" name="TxSqlListener" schedule-frequency="${esb.demandInterval}">
<property name="transacted" value="false"/>
</sql-listener>
</listeners>
<actions mep="OneWay">
<action class="com.tandbergtv.tstv.rcs.esb.MyAction" name="action1" process="displayMessage1"/>
</actions>
</service>
</services>
</jbossesb>
PS: the esb.demandInterval and other values are coming from the properties-service.xml. Am sure via debugging that the values are picked up correctly and even if they are not the default is 10seconds but the query is happening way more frequently than 10 seconds
Some more info...
If I use only one listener by deleting TxSqlListener and making the one above it SqlGateway as a non gateway listener I see the same issue for querying the database too frequently but for the export_gateway table. I therefore feel this is a bug in esb 4.9 since a non-gateway sql listener actually instantiates a SqlTableCourer which has no notion of schedule-frequency and goes around qurying the database once every 50 milliseconds.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/726482#726482]
Start a new discussion in JBoss ESB Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 5 months
[JBoss AS 7 Development] - JBoss AS7 Securing Passwords
by Anil Saldhana
Anil Saldhana [https://community.jboss.org/people/anil.saldhana] modified the document:
"JBoss AS7 Securing Passwords"
To view the document, visit: https://community.jboss.org/docs/DOC-17248
--------------------------------------------------------------
This article will describe the capabilities available in JBoss AS7.1 with regard to securing sensitive attributes such as passwords.
For windows platform, refer to https://community.jboss.org/docs/DOC-17763 https://community.jboss.org/wiki/AS7PasswordVaultOnWindows
**
#What_is_needed What is needed?
**
#Process Process
***
#Step_1_Create_a_Java_KeyStore Step 1: Create a Java KeyStore
***
#Step_2_Use_the_Vault_Tool_scripts_to_store_a_password_in_the_vault Step 2: Use the Vault Tool scripts to store a password in the vault
***
#Step_3_Configure_the_attributes_in_your_xml_such_as_standalonexml_and_hostxml Step 3: Configure the attributes in your xml such as standalone.xml and host.xml
**
#Guidance_for_subsystems_seeking_passwords_in_AS7 Guidance for subsystems seeking passwords in AS7
**
#Frequently_Asked_Questions Frequently Asked Questions:
*****
#How_secure_is_this How secure is this?
*****
#Can_I_really_secure_the_keystore Can I really secure the keystore?
*****
#I_lost_the_vault_formatted_string_for_my_attribute I lost the vault formatted string for my attribute?
*****
#Can_I_do_all_this_from_the_UI Can I do all this from the UI?
*****
#Show_me_how_to_do_this_on_Windows Show me how to do this on Windows.
*****
#Please_give_me_an_example Please give me an example.
h2. What is needed?
1. Java KeyStore.
2. Scripts provided in the bin directory of JBoss AS 7 .1 (vault.sh etc)
h2.
h2. Process
h3.
h3. Step 1: Create a Java KeyStore
$ keytool -genkey -alias vault -keyalg RSA -keysize 1024 -keystore vault.keystore
Enter keystore password: vault22
Re-enter new password:vault22
What is your first and last name?
[Unknown]: Picketbox vault
What is the name of your organizational unit?
[Unknown]: picketbox
What is the name of your organization?
[Unknown]: JBoss
What is the name of your City or Locality?
[Unknown]: chicago
What is the name of your State or Province?
[Unknown]: il
What is the two-letter country code for this unit?
[Unknown]: us
Is CN=Picketbox vault, OU=picketbox, O=JBoss, L=chicago, ST=il, C=us correct?
[no]: yes
Enter key password for <vault>
(RETURN if same as keystore password):
It is important to keep track of the keystore password and the alias. In this example, the keystore password is "vault22" and the alias is "vault".
h3. Step 2: Use the Vault Tool scripts to store a password in the vault
/bin/util$ ./vault.sh
=========================================================================
JBoss Vault
JBOSS_HOME: /home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT
JAVA: /opt/java/jdk1.6.0_23/bin/java
VAULT Classpath: /home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules/org/picketbox/main/*:/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules/org/jboss/logging/main/*:/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules/org/jboss/common-core/main/*:/home/anil/as7/jboss-as/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules/org/jboss/as/security/main/*
=========================================================================
**********************************
**** JBoss Vault ********
**********************************
Please enter a Digit:: 0: Start Interactive Session 1: Remove Interactive Session 2: Exit
0
Starting an interactive session
Enter directory to store encrypted files (end with either / or \ based on Unix or Windows:/home/anil/vault/
Enter Keystore URL:/home/anil/vault/vault.keystore
Enter Keystore password:
Enter Keystore password again:
Values match
Enter 8 character salt:12345678
Enter iteration count as a number (Eg: 44):50
Please make note of the following:
********************************************
Masked Password:MASK-5WNXs8oEbrs
salt:12345678
Iteration Count:50
********************************************
Enter Keystore Alias:vault
Sep 28, 2011 11:48:39 AM org.jboss.security.vault.SecurityVaultFactory get
INFO: Getting Security Vault with implementation of org.picketbox.plugins.vault.PicketBoxSecurityVault
Obtained Vault
Intializing Vault
Vault is initialized and ready for use
Handshake with Vault complete
Please enter a Digit:: 0: Store a password 1: Check whether password exists 2: Exit
0
Task: Store a password
Please enter attribute value:
Please enter attribute value again:
Values match
Enter Vault Block:ds_ExampleDS
Enter Attribute Name:password
Attribute Value for (ds_ExampleDS, password) saved
Please make note of the following:
********************************************
Vault Block:ds_ExampleDS
Attribute Name:password
Shared Key:N2NhZDYzOTMtNWE0OS00ZGQ0LWE4MmEtMWNlMDMyNDdmNmI2TElORV9CUkVBS3ZhdWx0
Configuration should be done as follows:
VAULT::ds_ExampleDS::password::N2NhZDYzOTMtNWE0OS00ZGQ0LWE4MmEtMWNlMDMyNDdmNmI2TElORV9CUkVBS3ZhdWx0
********************************************
Please enter a Digit:: 0: Store a password 1: Check whether password exists 2: Exit
2
h3. Step 3: Configure the attributes in your xml such as standalone.xml and host.xml
h3.
<server xmlns="urn:jboss:domain:1.1">
<extensions>
...
</extensions>
<vault>
<vault-option name="KEYSTORE_URL" value="/home/anil/vault/vault.keystore"/>
<vault-option name="KEYSTORE_PASSWORD" value="MASK-3y28rCZlcKR"/>
<vault-option name="KEYSTORE_ALIAS" value="vault"/>
<vault-option name="SALT" value="12438567"/>
<vault-option name="ITERATION_COUNT" value="50"/>
<vault-option name="ENC_FILE_DIR" value="${user.home}/vault/"/>
</vault>
...
<subsystem xmlns="urn:jboss:domain:datasources:1.0">
<datasources>
<datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
<connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
<driver>h2</driver>
<pool></pool>
<security>
<user-name>sa</user-name>
<password>${VAULT::ds_ExampleDS::password::N2NhZDYzOTMtNWE0OS00ZGQ0LWE4MmEtMWNlMDMyNDdmNmI2TElORV9CUkVBS3ZhdWx0}</password>
</security>
</datasource>
<drivers>
<driver name="h2" module="com.h2database.h2">
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
Note previously, the datasource password would have been:
<security>
<user-name>sa</user-name>
<password>sa</password>
</security>
h2.
h2. Guidance for subsystems seeking passwords in AS7
The server module in JBoss AS7 workspace has a class called as VaultUtil which has methods for you to seamlessly pass the vault formatted string to get the password from the vault.
I am posting the integration done in org.jboss.as.connector.subsystems.datasources.AbstractDataSourceService
Note that do not seek the password from the vault during the xml parsing phase because the vault has not been initialized and ready. It has to be done in the services phase when you actually do something with the configured elements of your subsystem.
In the case of JCA datasource integration, we do it in AbstractDataSourceService
import org.jboss.as.server.services.security.VaultUtil;
import org.jboss.security.vault.SecurityVaultException;
final DsSecurity security = dataSourceConfig.getSecurity();
if (security != null) {
if (security.getUserName() != null) {
managedConnectionFactory.setUserName(security.getUserName());
}
if (security.getPassword() != null) {
String password = security.getPassword();
if (VaultUtil.isVaultFormat(password)) {
try {
password = VaultUtil.getValueAsString(password);
} catch (SecurityVaultException e) {
throw new RuntimeException(e); // TODO: use bundle from IJ
}
}
managedConnectionFactory.setPassword(password);
}
}
We do not want to make the configuration of the vault formatted string to be very difficult. As long as the formatted string is prefixed with VAULT::, the vault will be invoked. Custom implementations of the vault should consider the last token for any configuration.
If you are using the AttributeDefinition classes the vaulted expression will be automatically resolved when calling AttributeDefiniton.resolveModelAttribute(). If you are not using AttributeDefinition you need to call OperationContext.resolveExpression() yourself as this example from DataSourceModelNodeUtil
> ...
> *final* String password = +getResolvedStringIfSetOrGetDefault+(operationContext, dataSourceNode, +PASSWORD+, *null*);
> ...
>
> *private* *static* String getResolvedStringIfSetOrGetDefault(*final* OperationContext context, *final* ModelNode dataSourceNode, *final* SimpleAttributeDefinition key, *final* String defaultValue) {
> *if* (dataSourceNode.hasDefined(key.getName())) {
> *return* context.resolveExpressions(dataSourceNode.get(key.getName())).asString();
> } *else* {
> *return* defaultValue;
> }
> }
>
h2.
h2. Frequently Asked Questions:
* h5. How secure is this?
* The default implementation of the vault utlizes a Java KeyStore. Its configuration uses Password Based Encryption, which is security by obscurity.
* Ideally, 3rd party ISV robust implementations of Vaults should provide the necessary security.
* h5. Can I really secure the keystore?
* You can store the keystore on an USB or an encrypted secure usb or such.
* When the server starts, insert the USB. On successful start, you can remove the USB.
* h5. I lost the vault formatted string for my attribute?
* Just reinsert the attribute value in the vault to overrwrite what was previously stored. You will get a new formatted string to insert in the xml.
* h5. Can I do all this from the UI?
* Hopefully with time, we can get this integrated into the console.
* h5. *Show me how to do this on Windows.*
* https://community.jboss.org/docs/DOC-17763 https://community.jboss.org/wiki/AS7PasswordVaultOnWindows
* h5. Please give me an example.
* https://community.jboss.org/docs/DOC-17472 https://community.jboss.org/wiki/AS7UtilisingMaskedPasswordsViaTheVault
* https://community.jboss.org/docs/DOC-17503 https://community.jboss.org/docs/DOC-17503
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17248]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[JBoss AS 7 Development] - AS7 Password Vault on Windows
by Anil Saldhana
Anil Saldhana [https://community.jboss.org/people/anil.saldhana] created the document:
"AS7 Password Vault on Windows"
To view the document, visit: https://community.jboss.org/docs/DOC-17763
--------------------------------------------------------------
Reference: https://community.jboss.org/docs/DOC-17248 https://community.jboss.org/wiki/JBossAS7SecuringPasswords
What we need?
1. JDK installation
2. Setting of JAVA_HOME Environment Variable
3. Creation a KeyStore
4. JBoss AS 7.1.x installation
Step 1 JDK Installation
Please go to http://java.com http://java.com and download JDK installation for Windows. (Remember you need JDK installation and not JRE).
I tested this on Windows 7. I downloaded and installed JDK 1.6.0_31 from http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download... http://www.oracle.com/technetwork/java/javase/downloads/jdk-6u31-download...
I installed JDK6 in c:\Java directory.
Step 2 Setting of JAVA_HOME Environment Variable
I tested this on Windows 7. So your mileage may vary depending on whether you are on XP, Vista, Win7 etc. Please google and you will find instructions for your version of windows. They are pretty close.
* I went to Control Panel.
* Searched for "Environment".
* Chose the "Edit the system environment variables"
* I went into Advanced -> Environment Variables
* I created a new environment variable called JAVA_HOME and set the value to c:\Java\jdk1.6.0_31
* In the PATH environment variable, I appended %JAVA_HOME%\bin; (remember to add ; at the end)
* Run -> cmd
* Type java and you should see a bunch of options rather than "Java is not recognized"
Step 3 Create a Keystore
I created a directory called keystores in c:\
C:\>md keystores
C:\>cd keystores
C:\keystores>keytool
keytool usage:
-certreq [-v] [-protected]
[-alias <alias>] [-sigalg <sigalg>]
[-file <csr_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-changealias [-v] [-protected] -alias <alias> -destalias <destalias>
[-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-delete [-v] [-protected] -alias <alias>
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-exportcert [-v] [-rfc] [-protected]
[-alias <alias>] [-file <cert_file>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-genkeypair [-v] [-protected]
[-alias <alias>]
[-keyalg <keyalg>] [-keysize <keysize>]
[-sigalg <sigalg>] [-dname <dname>]
[-validity <valDays>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-genseckey [-v] [-protected]
[-alias <alias>] [-keypass <keypass>]
[-keyalg <keyalg>] [-keysize <keysize>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-help
-importcert [-v] [-noprompt] [-trustcacerts] [-protected]
[-alias <alias>]
[-file <cert_file>] [-keypass <keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-importkeystore [-v]
[-srckeystore <srckeystore>] [-destkeystore <destkeystore>]
[-srcstoretype <srcstoretype>] [-deststoretype <deststoretype>]
[-srcstorepass <srcstorepass>] [-deststorepass <deststorepass>]
[-srcprotected] [-destprotected]
[-srcprovidername <srcprovidername>]
[-destprovidername <destprovidername>]
[-srcalias <srcalias> [-destalias <destalias>]
[-srckeypass <srckeypass>] [-destkeypass <destkeypass>]]
[-noprompt]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-keypasswd [-v] [-alias <alias>]
[-keypass <old_keypass>] [-new <new_keypass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-list [-v | -rfc] [-protected]
[-alias <alias>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
-printcert [-v] [-file <cert_file>]
-storepasswd [-v] [-new <new_storepass>]
[-keystore <keystore>] [-storepass <storepass>]
[-storetype <storetype>] [-providername <name>]
[-providerclass <provider_class_name> [-providerarg <arg>]] ...
[-providerpath <pathlist>]
C:\keystores>keytool -alias vault -keyalg RSA -keysize 1024 -keystore vault.keys
tore
Usage error: no command provided
Try keytool -help
C:\keystores>keytool -genkey -alias vault -keyalg RSA -keysize 1024 -keystore va
ult.keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: PicketBox Vault
What is the name of your organizational unit?
[Unknown]: PicketBox
What is the name of your organization?
[Unknown]: JBoss
What is the name of your City or Locality?
[Unknown]: Chicago
What is the name of your State or Province?
[Unknown]: IL
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=PicketBox Vault, OU=PicketBox, O=JBoss, L=Chicago, ST=IL, C=US correct?
[no]: yes
Enter key password for <vault>
(RETURN if same as keystore password):
C:\keystores>
C:\keystores>dir
Volume in drive C is
Directory of C:\keystores
03/26/2012 11:58 AM <DIR> .
03/26/2012 11:58 AM <DIR> ..
03/26/2012 11:58 AM 1,359 vault.keystore
That is it.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-17763]
Create a new document in JBoss AS 7 Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[JBoss Tools Development] - How to Build JBoss Tools with Maven 3
by Nick Boldt
Nick Boldt [https://community.jboss.org/people/nickboldt] modified the document:
"How to Build JBoss Tools with Maven 3"
To view the document, visit: https://community.jboss.org/docs/DOC-16604
--------------------------------------------------------------
+*This article is a replacement for its precursor, https://community.jboss.org/docs/DOC-15513 How to Build JBoss Tools 3.2 with Maven 3.*+
+*Note that this article only discusses building from trunk. If you need to build from a branch, or switch between branches and/or trunk, see* https://community.jboss.org/docs/DOC-17497 How to Build JBoss Tools With Maven3 - Working With Branches+.
h2. Prerequisites
1. Java 1.6 SDK
2. Maven 3.0.3
3. Ant 1.8.2 or later ***NEW***
4. About 6 GB of free disk space if you want to run all integration tests for (JBoss AS, Seam and Web Services Tools) - *requires VPN access*
5. subversion client 1.6.X (should work with lower version as well, but newer versions may not work as expected)
h2. Environment Setup
h3. Maven and Java
Make sure your maven 3 is available by default and Java 1.6 is used.
mvn -version
should print out something like
*pache Maven 3.0.3* (r1075438; 2011-02-28 12:31:09-0500)
*Java version: 1.6.0_25*, vendor: Sun Microsystems Inc.
*Java home: /usr/java/jdk1.6.0_25/jre*
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "2.6.42.3-2.fc15.x86_64", arch: "amd64", family: "unix"
#
h2. Building Everything In One Build Locally Via Commandline
To run a local build of JBoss Tools 3.3 against the new *Eclipse 3.7.2*-based Target Platform, I suggest a three two-step approach:
a) build the parent & target platform poms (v0.0.2-SNAPSHOT) *[NO LONGER REQUIRED, THESE CAN BE RESOLVED FROM https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo... JBoss Nexus]*
b) resolve the target platform to your local disk *[ONLY NEEDED https://source.jboss.org/browse/JBossTools/trunk/build/target-platform/un... WHEN THIS CHANGES]*
c) build against your local copy of the target platform [every time you change sources and want to rebuild]
Once (a) and (b) are done, you need only perform (c) iteratively until you're happy (that is, until everything compiles). This lets you test changes locally before committing back to SVN.
*(a) and (b) need only be done when the parent pom and Target Platform (TP) change.*
*a) build the parent & target platform poms (v0.0.3-SNAPSHOT is used for Beta1 and Beta2; v0.0.4-SNAPSHOT is used for Beta3 and beyond, and can be found in https://repository.jboss.org/nexus/content/repositories/snapshots/org/jbo... JBoss Nexus)
*
svn co http://svn.jboss.org/repos/jbosstools/trunk jbosstools
cd jbosstools/build/parent
mvn clean install
...
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]
[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]
...
*NOTE: You need not fetch the entire JBoss Tools tree from SVN (or Git (http://divby0.blogspot.com/2011/01/howto-partially-clone-svn-repo-to-git....
*Instead, you can just fetch the build/ folder and one or more component folders, then as before,*
*build the parent pom. After that, go into the component folder and run maven there (#runmavenpercomponent).*
mkdir jbosstools
cd jbosstools
svn co http://svn.jboss.org/repos/jbosstools/trunk/build
svn co http://svn.jboss.org/repos/jbosstools/trunk/jmx
cd jbosstools/build/parent
mvn clean install
...
[INFO] Reactor Summary:
[INFO]
[INFO] JBoss Tools Target Platform Definition ............ SUCCESS [0.724s]
[INFO] JBoss Tools Parent ................................ SUCCESS [0.461s]
...
*b) resolve the target platform to your local disk*
There are two ways to do this:
i) Download and unpack the latest TP zip, *OR*
ii) Resolve the TP using Maven or Ant
+i) Download and unpack the latest TP zip+
You can either download the TP as a zip [5] and unpack it into some folder on your disk. For convenience, the easiest is to unzip into jbosstools/build/target-platform/REPO/, since that's where the Maven or Ant process will by default operate.
You can do that with any browser or on a command line with curl or similar:
curl -C - -O http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo.SR2/<actualFilename>.target.zip
...
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 606M 100 606M 0 0 164k 0 1:02:54 1:02:54 --:--:-- 172k
and then unzip it:
mkdir jbosstools/build/target-platform/REPO
unzip *.target.zip -d jbosstools/build/target-platform/REPO
[5] http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo.SR2/ http://download.jboss.org/jbosstools/updates/target-platform_3.3.indigo.S...
*OR*
*
*
+ii) Resolve the TP using Maven 3 or Ant 1.8+
cd jbosstools/build/target-platform
mvn clean install -Pget.local.target
The get.local.target profile will resolve the target platform file, multiple.target, as a p2 repository on your local disk in ~/trunk/build/target-platform/REPO/. It may take a while, so you're better off from a speed point-of-view simply fetching the latest zip [5]. However, if you want to see what actually happens to create the TP (as done in Hudson) this is the approach to take.
Since the Maven profile is simply a wrapper call to Ant, you can also use Ant 1.8 or later directly:
cd jbosstools/build/target-platform
ant help # show usage instructions
*c) build against your local copy of the target platform*
*NOTE:* You must specify a path starting with *file:///* (three or more slashes) to avoid errors such as "+p2.core.ProvisionException URI has an authority component+".
*LINUX / MAC USERS*
cd build
mvn clean install -U -B -fae -e -P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ | tee build.all.log.txt
(tee is a program that pipes console output to BOTH console and a file so you can watch the build AND keep a log.)
*WINDOWS USERS*
cd c:\trunk\build
mvn3 clean install -U -B -fae -e -P local.site -Dlocal.site=file:///C:/trunk/build/target-platform/REPO/
or
mvn3 clean install -U -B -fae -e -Plocal.site -Dlocal.site=file:///C:/trunk/build/target-platform/REPO/ > build.all.log.txt
If you downloaded the zip and unpacked is somewhere else, use -Dlocal.site=file:///.../ to point at that folder instead.
#
h2. Building Individual Components Locally Via Commandline
First, see #build-everything previous section on building everything for parent pom and target platform bootstrapping.
Next, to build a single component (or even just a single plugin), go into that folder and run Maven there:
cd ~/trunk/jmx
mvn3 clean install -U -B -fae -e -P local.site -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ | tee build.jmx.log.txt
+-- OR, if you prefer to use the "bootstrap profiles", which will build a given component PLUS its upstream JBoss Tools dependencies from source: --+
cd ~/trunk/build
mvn3 clean install -U -B -fae -e -P local.site,jmx-bootstrap -Dlocal.site=file:///${HOME}/trunk/build/target-platform/REPO/ | tee build.jmx.log.txt
++
#
h2. Building Locally In Eclipse
First, you must have installed m2eclipse into your Eclipse (or JBDS). You can install the currently supported version from this update site:
http://download.jboss.org/jbosstools/updates/indigo/ http://download.jboss.org/jbosstools/updates/indigo/
Next, start up Eclipse or JBDS and do *File > Import* to import the project(s) you already checked out from SVN above into your workspace.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
Browse to where you have the project(s) checked out, and select a folder to import pom projects. In this case, I'm importing the parent pom (which refers to the target platform pom). Optionally, you can add these new projects to a working set to collect them in your Package Explorer view.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
Once the project(s) are imported, you'll want to build them. You can either do *CTRL-SHIFT-X,M (Run Maven Build),* or right-click the project and select *Run As > Maven Build*. The following screenshots show how to configure a build job.
First, on the *Main* tab, set a *Name*, *Goals*, *Profile*(s), and add a *Parameter*. Or, if you prefer, put everything in the *Goals* field for simplicity:
+clean install -U -B -fae -e -Plocal.site -Dlocal.site=file://home/nboldt/tmp/JBT_REPO_Indigo/+
Be sure to check *Resolve Workspace artifacts*, and, if you have a newer version of Maven installed, point your build at that *Maven Runtime* instead of the bundled one that ships with m2eclipse.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
On the *JRE* tab, make sure you're using a 6.0 JDK.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
On the *Refresh* tab, define which workspace resources you want to refresh when the build's done.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
On the *Common* tab, you can store the output of the build in a log file in case it's particularly long and you need to refer back to it.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
Click *Run* to run the build.
https://community.jboss.org/servlet/JiveServlet/showImage/102-16604-27-13... https://community.jboss.org/servlet/JiveServlet/downloadImage/102-16604-2...
Now you can repeat the above step to build any other component or plugin or feature or update site from the JBoss Tools repo. Simply import the project(s) and build them as above.
h2. Tips and tricks for making BOTH PDE UI and headless Maven builds happy
It's fairly common to have plugins compiling in eclipse while tycho would not work. Basically you could say that tycho is far more picky compared to Eclipse PDE.
h3.
Check your build.properties
Check build.properties in your plugin. If it has warnings in Eclipse, you'll most likely end with tycho failing to compile your sources. You'll have to make sure that you correct all warnings.
Especially check your build.properties to have entries for *source..* and *output..*
*
*
source.. = src/
output.. = bin/
h2.
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-16604]
Create a new document in JBoss Tools Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months
[JBoss Web Services Development] - JBossWS - Building From Source
by Alessio Soldano
Alessio Soldano [https://community.jboss.org/people/asoldano] modified the document:
"JBossWS - Building From Source"
To view the document, visit: https://community.jboss.org/docs/DOC-13547
--------------------------------------------------------------
This page documents the *Maven* based build that we use *since jbossws-3.0.2*. See the https://community.jboss.org/docs/DOC-13514 Mavenization page for details regarding configuring you Maven environment. The Ant based build of previous versions, is documented https://community.jboss.org/docs/DOC-13548 here.
**
#Checkout_and_build_JBossAS Checkout and build JBossAS
***
#Run_jboss Run jboss
**
#Checkout_and_build_JBossWSCXF Checkout and build JBossWS-CXF
***
#_Edit_profilesxml_JBossWS_3x_only Edit profiles.xml (JBossWS 3.x only)
***
#BuildDeploy Build/Deploy
***
#Run_the_smoke_tests Run the smoke tests
**
#Checkout_and_build_JBossWSNative Checkout and build JBossWS-Native
***
#Edit_profilesxml_JBossWS_3x_only Edit profiles.xml (JBossWS 3.x only)
***
#BuildDeploy_207011 Build/Deploy
***
#Run_the_smoke_tests_997924 Run the smoke tests
h2. Checkout and build JBossAS
For building *JBoss AS 7* series, have a look at https://community.jboss.org/docs/DOC-15596 https://community.jboss.org/wiki/HackingOnAS7
For *previous JBoss AS versions* instead:
svn co http://anonsvn.jboss.org/repos/jbossas/trunk
cd trunk
build/build.sh
For more information, see http://wiki.jboss.org/wiki/Wiki.jsp?page=SVNRepository SVNRepository
h3. Run jboss
Before you start jboss, you should follow the deploy steps for a supported stack (see below).
Then start the application server using the scripts available for that.
h2. Checkout and build JBossWS-CXF
svn co http://anonsvn.jboss.org/repos/jbossws/stack/cxf/trunk jbossws-cxf
For more information, see https://community.jboss.org/docs/DOC-13526 Subversion
h3. ** Edit profiles.xml (JBossWS 3.x only)
<profile>
<id>jboss-home-profile</id>
<activation>
<property>
<name>user.name</name>
</property>
</activation>
<properties>
<jboss421.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA</jboss421.home>
<jboss422.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA</jboss422.home>
<jboss423.home>/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.3.GA</jboss423.home>
<jboss500.home>/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta4/build/output/jboss-5.0.0.Beta4</jboss500.home>
<jboss501.home>/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.CR1</jboss501.home>
</properties>
</profile>
Starting from JBossWS 4, the build is supporting Maven 3, which made the use of profiles.xml deprecated.As a consequence of that, you should actually be providing the jbossXYZ.home property on the command line when invoking mvn.h3. Build/Deploy
To deploy jbossws-cxf you run:
cd jbossws-cxf
ant deploy-jboss500
Starting from JBossWS-CXF 3.4.0 SpringFramework libraries are not installed by default. If still want that you need to run:
ant -Dspring=true deploy-jboss500
When jboss starts you should see something like
13:16:25,104 INFO [ServerImpl] Starting JBoss (Microcontainer)...
13:16:25,106 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200805051004)
...
13:18:01,278 INFO [CXFServerConfig] JBoss Web Services - Stack CXF Runtime Client
13:18:01,279 INFO [CXFServerConfig] 3.0.2-SNAPSHOT
...
13:18:09,355 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
13:18:09,389 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200805051004)] Started in 1m:44s:270ms
h3. Run the smoke tests
cd jbossws-cxf
mvn -Psmoketest,jboss501 test
Starting from JBossWS 4, the integration testsuites have been moved to 'integration-test' maven phase. So you need to use:
mvn -Psmoketest,jboss710 -Djboss710.home=path-to-jboss710 integration-test
You should expect to see no test failures. There might be a number of FIXME messages on the console. These are linked to open JIRA issues.
Tests that are known to fail should be excluded in the container specific exclude file. Note, if a test is excluded it is not even compiled and hence will not run in any of the ant test targets.
h2. Checkout and build JBossWS-Native
svn co http://anonsvn.jboss.org/repos/jbossws/stack/native/trunk jbossws-native
For more information, see https://community.jboss.org/docs/DOC-13526 Subversion
h3. Edit profiles.xml (JBossWS 3.x only)
<profile>
<id>jboss-home-profile</id>
<activation>
<property>
<name>user.name</name>
</property>
</activation>
<properties>
<jboss421.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_1_GA/build/output/jboss-4.2.1.GA</jboss421.home>
<jboss422.home>/home/tdiesler/svn/jbossas/tags/JBoss_4_2_2_GA/build/output/jboss-4.2.2.GA</jboss422.home>
<jboss423.home>/home/tdiesler/svn/jbossas/branches/Branch_4_2/build/output/jboss-4.2.3.GA</jboss423.home>
<jboss500.home>/home/tdiesler/svn/jbossas/tags/JBoss_5_0_0_Beta4/build/output/jboss-5.0.0.Beta4</jboss500.home>
<jboss501.home>/home/tdiesler/svn/jbossas/trunk/build/output/jboss-5.0.0.CR1</jboss501.home>
</properties>
</profile>
Starting from JBossWS 4, the build is supporting Maven 3, which made the use of profiles.xml deprecated.As a consequence of that, you should actually be providing the jbossXYZ.home property on the command line when invoking mvn.
h3. Build/Deploy
To deploy jbossws-native you run:
cd jbossws-native
ant deploy-jboss501
When jboss starts you should see something like
09:32:09,581 INFO [ServerImpl] Starting JBoss (Microcontainer)...
09:32:09,583 INFO [ServerImpl] Release ID: JBoss [Morpheus] 5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200805051004)
...
09:33:24,587 INFO [NativeServerConfig] JBoss Web Services - Stack Native Core
09:33:24,588 INFO [NativeServerConfig] 3.0.2-SNAPSHOT
...
09:33:32,318 INFO [AjpProtocol] Starting Coyote AJP/1.3 on ajp-127.0.0.1-8009
09:33:32,341 INFO [ServerImpl] JBoss (Microcontainer) [5.0.0.CR1 (build: SVNTag=JBoss_5_0_0_CR1 date=200805051004)] Started in 1m:22s:744ms
h3. Run the smoke tests
cd jbossws-native
mvn -Psmoketest,jboss501 test
You should expect to see no test failures. There might be a number of FIXME messages on the console. These are linked to open JIRA issues.
Starting from JBossWS 4, the integration testsuites have been moved to 'integration-test' maven phase. So you need to use:
mvn -Psmoketest,jboss710 -Djboss710.home=path-to-jboss710 integration-test
--------------------------------------------------------------
Comment by going to Community
[https://community.jboss.org/docs/DOC-13547]
Create a new document in JBoss Web Services Development at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=102&c...]
12 years, 5 months