Skip to content

Feed aggregator

CloudBees BuildHive is Alive!

GitHub users rejoice!  Today CloudBees announced the release of BuildHive, a continuous integration tool that enables build/text jobs for existing GitHub repositories.  CloudBees is currently a leading "Java in the Cloud" service that should be well-known to avid DZone readers.   BuildHive is cloud-powered by Jenkins, the popular Java-based open source continuous integration tool. ...
Categories: Communities

Apache Camel Tutorial - Introduction to EIP, Routes, Components, Testing and other Concepts

TheServerSide.com - 3 hours 22 min ago
Data exchanges between companies increase a lot. The number of applications, which must be integrated increases, too. The interfaces use different technologies, protocols and data formats. Nevertheless, the integration of these applications shall be modeled in a standardized way, realized efficiently and supported by automatic tests. Such a standard exists with the Enterprise Integration Patterns (EIP) [1], which have become the industry standard for describing, documenting and implementing integration problems

Add to digg Add to StumbleUpon Add to del.icio.us Add to Google
Categories: Communities

Re-Invent Software Delivery and Offer Your Business as a Service

As business leaders focus on growth during 2012, they are identifying business expansion and transformation opportunities.  The resulting IT mandate to rapidly evolve mobile and social interactions is forcing CIOs to re-invent their software delivery.  By following a straightforward four-step plan, CIOs can improve productivity, enhance agility, deliver timely solutions, and help fulfill...
Categories: Communities

On Developing for the Cloud with Cloudbees

There's a lot of buzz about deploying applications in the cloud, but what about developing applications in the cloud? In my opinion that's the next level of cloud adaptation. I recently got a FOSS (free and open source) account on CloudBees.com for my open source Qualitas project. I'm very impressed with what it can do for you. Read below to know all the details. Preview Text:  ...
Categories: Communities

Progress Report from CamelOne 2012 in Boston (Apache Camel, ActiveMQ, ServiceMix, CXF)

This week, I was at CamelOne 2012 in Boston, organized by FuseSource.  The sessions addressed several open source integration projects from Apache. Here is a short summary of the event... Preview Text:  This week, I was at CamelOne 2012 in Boston, organized by FuseSource. Sessions covered several open source projects such as Apache Camel, Apache...
Categories: Communities

Before Choosing, Know Your Cloud Dimensions

Summary:  Before selecting PaaS infrastructure, understand how sharing, location, and responsibility impact your public/private Cloud and internal/external Cloud decision. Preview Text:  Before selecting PaaS infrastructure, understand how sharing, location, and responsibility impact your public/private Cloud and internal/external Cloud...
Categories: Communities

JBossAS7.1 Configuration in OpenShift

Enter The JBoss Matrix - 8 hours 3 min ago

The OpenShift PaaS environment has updated the JBossAS cartridge to use jboss-as-7.1.0.Final as the server version.  This post updates how to test the OpenShift JBossAS7 7.1.0.Final based cartridge standalone configuration in your own environment.

 

The configuration of the JBossAS7 server used by the OpenShift Express JBossAS cartridge is a simple modification of the jboss-as-7.1.0.Final release which my be obtained from http://www.jboss.org/as7.html

 

The contents of the jboss-as-7.1.0.Final release need to be updated with the attached standalone.xml, standalone.conf, and the database driver modules. The exact steps would be:

  1. Create a demo directory to contain the files. I use /tmp/as710conf, so if you use the same, no changes need to be made to the following directions or configuration files.
  2. download http://download.jboss.org/jbossas/7.1/jboss-as-7.1.0.Final/jboss-as-7.1.0.Final.zip
  3. unzip jboss-as-7.1.0.Final.zip
  4. Create a link from jbossas-7 to jboss-as-7.1.0.Final, or copy the jboss-as-7.1.0.Final directory to jbossas-7
    1. ln -s jboss-as-7.1.0.Final jbossas-7
  5. Download the attachments on this blog
  6. unzip bin.zip to get the bin/{standalone.conf,standalone.sh} files
  7. cp bin/* to jbossas-7/bin
  8. Edit the jbossas-7/bin/standalone.conf file to change any of the
  9. unzip the modules.zip from within the jbossas-7 directory to add the modules for mysql, mongodb, and switchyard to the server modules. (Note, the attached modules.zip does not contain the switchyard modules as this made the attachment too large. To build the full modules.zip, clone the https://github.com/openshift/jboss-as7-modules repo and do a 'gradle createModuleZip' to build it.)

 

 

There are several environment variables referenced in the standalone.xml from the OpenShift JBossAS7 cartridge standalone.xml and standalone.conf files. They are:

 

# OPENSHIFT_GEAR_NAME is the NAME of the application as passed to the rhc create app -a NAME … command
OPENSHIFT_GEAR_NAME

# OPENSHIFT_REPO_DIR is the git repository of the application deployment. For reproducing the standalone configuration
# it has no meaningful value as it is only used to pickup application specific overrides of the server
# configuration files.
OPENSHIFT_REPO_DIR = 

# OPENSHIFT_GEAR_DIR is the root directory of the application. 
OPENSHIFT_GEAR_DIR = 

# OPENSHIFT_GEAR_TYPE is jbossas-7 for a jbossas cartridge. This is also used as the root of
# the jbossas7 application server associated with the application. In the OpenShift environment, each
# application is associated with a user that has a copy of the jboss-as-7.1.0.Final server contents installed to ${OPENSHIFT_GEAR_DIR}${OPENSHIFT_GEAR_TYPE}, e.g., /tmp/demo/jbossas-7.
OPENSHIFT_GEAR_TYPE = jbossas-7. 

# OPENSHIFT_DB_TYPE is the type of the embedded database configured using the rhc-ctl-app command:
# rhc-ctl-app -a demo -e add-mysql-5.1
# This will be empty if no database cartridge has been embedded.
OPENSHIFT_DB_TYPE = 
# OPENSHIFT_DB_HOST gives the IP address the embedded database is listening on
OPENSHIFT_DB_HOST
# OPENSHIFT_DB_PORT gives the port the embedded database is listening on
OPENSHIFT_DB_PORT
# OPENSHIFT_DB_USERNAME gives the configured username to access the embedded database
OPENSHIFT_DB_USERNAME
# OPENSHIFT_DB_PASSWORD gives the configured username to access the embedded database
OPENSHIFT_DB_PASSWORD

# OPENSHIFT_INTERNAL_IP is the local ip address to bind the server's services to. Typically you would use
# localhost/127.0.0.1 for your local environment.
OPENSHIFT_INTERNAL_IP = 

# OPENSHIFT_JBOSS_CLUSTER is the ip address[port] for the TCPPING initial_hosts property used by the jgroups
# subsystem configuration. This is used when scaling of the application is enabled in OpenShift. For local, single server
# testing this will not be used.
OPENSHIFT_JBOSS_CLUSTER = 

# OPENSHIFT_JBOSS_CLUSTER_PROXY_PORT is the port used by the TCP groups protocol bind_port property.
OPENSHIFT_JBOSS_CLUSTER_PROXY_PORT = 7600

# OPENSHIFT_GEAR_DNS is the public dns name of the server hosting the application created by rhc app create -a … .
# For an application named demo, in a domain named jbossdev, the DNS name would be: demo-jbossdev.rhcloud.com.
# This is used by the jgroups subsystem configuration as the ip address/hostname for the external_addr property used to
# communicate with other jboss instances. For a local, single server testing this should be the same as the
# OPENSHIFT_INTERNAL_IP value.
OPENSHIFT_GEAR_DNS = 

# The node_profile value is derived from the type of node the application is running on. The default is small as that is the free
# offering which provide 500Mb of memory to the application. 
node_profile = small

 

The relevant values for these in the attached standalone.conf file that I tested with are:

 

#### Edit this variables for your test environment
export OPENSHIFT_GEAR_NAME=as710conf
export OPENSHIFT_GEAR_DIR=/tmp/as710conf/
export OPENSHIFT_GEAR_TYPE=jbossas-7
export OPENSHIFT_INTERNAL_IP=127.0.0.1
export OPENSHIFT_GEAR_DNS=127.0.0.1
export node_profile=small
####

 

Running the OpenShift configuration is realized by executing the standalone.sh from your jbossas-7/bin directory:

 

[152](ironmaiden:as710conf) > cd /tmp/as710conf/jbossas-7/bin/
[153](ironmaiden:bin) > ./standalone.sh 
=========================================================================


  JBoss Bootstrap Environment


  JBOSS_HOME: /tmp/as710conf/jbossas-7


  JAVA: /System/Library/Frameworks/JavaVM.framework/Versions/1.6/Home/bin/java


  JAVA_OPTS: -d32 -client -Xmx256m -XX:MaxPermSize=128m -XX:+AggressiveOpts -Dorg.apache.tomcat.util.LOW_MEMORY=true -Dorg.jboss.resolver.warning=true -Djava.net.preferIPv4Stack=true -Djboss.node.name=127.0.0.1 -Djgroups.bind_addr=127.0.0.1


=========================================================================


05:47:38,320 INFO  [org.jboss.modules] JBoss Modules version 1.1.1.GA
05:47:38,490 INFO  [org.jboss.msc] JBoss MSC version 1.0.2.GA
05:47:38,554 INFO  [org.jboss.as] JBAS015899: JBoss AS 7.1.0.Final "Thunder" starting
05:47:39,265 INFO  [org.xnio] XNIO Version 3.0.3.GA
05:47:39,265 INFO  [org.jboss.as.server] JBAS015888: Creating http management service using socket-binding (management-http)
05:47:39,274 INFO  [org.xnio.nio] XNIO NIO Implementation Version 3.0.3.GA
05:47:39,283 INFO  [org.jboss.remoting] JBoss Remoting version 3.2.2.GA
05:47:39,294 INFO  [org.jboss.as.logging] JBAS011502: Removing bootstrap log handlers
05:47:39,297 INFO  [org.jboss.as.configadmin] (ServerService Thread Pool -- 26) JBAS016200: Activating ConfigAdmin Subsystem
05:47:39,307 INFO  [org.jboss.as.clustering.infinispan] (ServerService Thread Pool -- 31) JBAS010280: Activating Infinispan subsystem.
05:47:39,328 INFO  [org.jboss.as.security] (ServerService Thread Pool -- 44) JBAS013101: Activating Security Subsystem
05:47:39,333 INFO  [org.jboss.as.osgi] (ServerService Thread Pool -- 39) JBAS011940: Activating OSGi Subsystem
05:47:39,336 INFO  [org.jboss.as.naming] (ServerService Thread Pool -- 38) JBAS011800: Activating Naming Subsystem
05:47:39,342 INFO  [org.jboss.as.security] (MSC service thread 1-3) JBAS013100: Current PicketBox version=4.0.6.final
05:47:39,359 INFO  [org.jboss.as.connector] (MSC service thread 1-7) JBAS010408: Starting JCA Subsystem (JBoss IronJacamar 1.0.7.Final)
05:47:39,372 INFO  [org.jboss.as.webservices] (ServerService Thread Pool -- 48) JBAS015537: Activating WebServices Extension
05:47:39,480 INFO  [org.jboss.as.naming] (MSC service thread 1-8) JBAS011802: Starting Naming Service
05:47:39,503 INFO  [org.jboss.as.mail.extension] (MSC service thread 1-4) JBAS015400: Bound mail session [java:jboss/mail/Default]
05:47:39,518 INFO  [org.jboss.as.connector.subsystems.datasources] (ServerService Thread Pool -- 27) JBAS010403: Deploying JDBC-compliant driver class org.h2.Driver (version 1.3)
05:47:39,567 INFO  [org.jboss.ws.common.management.AbstractServerConfig] (MSC service thread 1-7) JBoss Web Services - Stack CXF Server 4.0.1.GA
05:47:39,687 INFO  [org.apache.coyote.http11.Http11Protocol] (MSC service thread 1-7) Starting Coyote HTTP/1.1 on http--127.0.0.1-8080
05:47:39,837 INFO  [org.jboss.as.server.deployment.scanner] (MSC service thread 1-5) JBAS015012: Started FileSystemDeploymentService for directory /tmp/as710conf/jbossas-7/standalone/deployments
05:47:39,853 INFO  [org.jboss.as.remoting] (MSC service thread 1-3) JBAS017100: Listening on /127.0.0.1:4447
05:47:39,853 INFO  [org.jboss.as.remoting] (MSC service thread 1-6) JBAS017100: Listening on /127.0.0.1:9999
05:47:39,941 INFO  [org.jboss.as.connector.subsystems.datasources] (MSC service thread 1-5) JBAS010400: Bound data source [java:jboss/datasources/ExampleDS]
05:47:39,950 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: JBoss AS 7.1.0.Final "Thunder" started in 1922ms - Started 134 of 205 services (70 services are passive or on-demand)

 

 

Diff of Configuration Files

The full difference from the base standalone.xml configuration you would see in a current jbossas-7 cartridge application on OpenShift vs the standalone.xml seen in the jboss-as-7.1.0.Final/standalone/configuration/standalone.xml is show below.

 

[260](ironmaiden:tmp) > diff -w /tmp/demo/.openshift/config/standalone.xml /home/git/JBossAS/Downloads/jboss-as-7.1.0.Final/standalone/configuration/standalone.xml
7c7
<         <extension module="org.jboss.as.clustering.jgroups"/>
---
>         <extension module="org.jboss.as.configadmin"/>
18a19
>         <extension module="org.jboss.as.osgi"/>
25a27
>         <extension module="org.jboss.as.webservices"/>
29c31
<     <!--management>
---
>     <management>
50c52
<     </management-->
---
>     </management>
54c56
<             <!--console-handler name="CONSOLE">
---
>             <console-handler name="CONSOLE">
59c61
<             </console-handler-->
---
>             </console-handler>
62c64
<                     <pattern-formatter pattern="%d{yyyy/MM/dd HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
---
>                     <pattern-formatter pattern="%d{HH:mm:ss,SSS} %-5p [%c] (%t) %s%E%n"/>
86c88
<                     <!--handler name="CONSOLE"/-->
---
>                     <handler name="CONSOLE"/>
90a93
>         <subsystem xmlns="urn:jboss:domain:configadmin:1.0"/>
93,94c96,97
<                 <datasource jndi-name="java:jboss/datasources/ExampleDS" enabled="true" use-java-context="true" pool-name="H2DS">
<                     <connection-url>jdbc:h2:${jboss.server.data.dir}/test;DB_CLOSE_DELAY=-1</connection-url>
---
>                 <datasource jndi-name="java:jboss/datasources/ExampleDS" pool-name="ExampleDS" enabled="true" use-java-context="true">
>                     <connection-url>jdbc:h2:mem:test;DB_CLOSE_DELAY=-1</connection-url>
101,116d103
<                 <datasource jndi-name="java:jboss/datasources/MysqlDS" enabled="${mysql.enabled}" use-java-context="true" pool-name="MysqlDS">
<                     <connection-url>jdbc:mysql://${env.OPENSHIFT_DB_HOST}:${env.OPENSHIFT_DB_PORT}/${env.OPENSHIFT_GEAR_NAME}</connection-url>
<                     <driver>mysql</driver>
<                     <security>
<                       <user-name>${env.OPENSHIFT_DB_USERNAME}</user-name>
<                       <password>${env.OPENSHIFT_DB_PASSWORD}</password>
<                     </security>
<                 </datasource>
<                 <datasource jndi-name="java:jboss/datasources/PostgreSQLDS" enabled="${postgresql.enabled}" use-java-context="true" pool-name="PostgreSQLDS" use-ccm="true">
<                     <connection-url>jdbc:postgresql://${env.OPENSHIFT_DB_HOST}:${env.OPENSHIFT_DB_PORT}/${env.OPENSHIFT_GEAR_NAME}</connection-url>
<                     <driver>postgresql</driver>
<                     <security>
<                       <user-name>${env.OPENSHIFT_DB_USERNAME}</user-name>
<                       <password>${env.OPENSHIFT_DB_PASSWORD}</password>
<                     </security>
<                 </datasource>
121,126d107
<                     <driver name="mysql" module="com.mysql.jdbc">
<                         <xa-datasource-class>com.mysql.jdbc.jdbc2.optional.MysqlXADataSource</xa-datasource-class>
<                     </driver>
<                     <driver name="postgresql" module="org.postgresql.jdbc">
<                         <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class>
<                     </driver>
139c120
<                 <stateful default-access-timeout="5000" cache-ref="simple" clustered-cache-ref="clustered"/>
---
>                 <stateful default-access-timeout="5000" cache-ref="simple"/>
142c123
<             <!--mdb>
---
>             <mdb>
145c126
<             </mdb-->
---
>             </mdb>
155d135
<                 <cache name="clustered" passivation-store-ref="infinispan" aliases="StatefulTreeCache"/>
159d138
<                 <cluster-passivation-store name="infinispan" cache-container="ejb"/>
172d150
<             <!--iiop enable-by-default="false" use-qualified-name="false"/-->
174,204c152
<         <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="cluster">
<             <cache-container name="cluster" aliases="ha-partition" default-cache="default">
<                 <transport lock-timeout="60000"/>
<                 <replicated-cache name="default" mode="SYNC" batching="true">
<                     <locking isolation="REPEATABLE_READ"/>
<                 </replicated-cache>
<             </cache-container>
<             <cache-container name="web" aliases="standard-session-cache" default-cache="repl">
<                 <transport lock-timeout="60000"/>
<                 <replicated-cache name="repl" mode="ASYNC" batching="true">
<                     <file-store/>
<                 </replicated-cache>
<                 <replicated-cache name="sso" mode="SYNC" batching="true"/>
<                 <distributed-cache name="dist" mode="ASYNC" batching="true">
<                     <file-store/>
<                 </distributed-cache>
<             </cache-container>
<             <cache-container name="ejb" aliases="sfsb sfsb-cache" default-cache="repl">
<                 <transport lock-timeout="60000"/>
<                 <replicated-cache name="repl" mode="ASYNC" batching="true">
<                     <eviction strategy="LRU"/>
<                     <file-store/>
<                 </replicated-cache>
<                 <!-- Clustered cache used internally by EJB subsytem for managing the client-mapping(s) of
<                 the socketbinding referenced by the EJB remoting connector -->
<                 <replicated-cache name="remote-connector-client-mappings" mode="SYNC" batching="true"/>
<                 <distributed-cache name="dist" mode="ASYNC" batching="true">
<                     <eviction strategy="LRU"/>
<                     <file-store/>
<                 </distributed-cache>
<             </cache-container>
---
>         <subsystem xmlns="urn:jboss:domain:infinispan:1.1" default-cache-container="hibernate">
206,208c154,155
<                 <transport lock-timeout="60000"/>
<                 <local-cache name="local-query">
<                     <transaction mode="NONE"/>
---
>                 <local-cache name="entity">
>                     <transaction mode="NON_XA"/>
212,213c159,160
<                 <invalidation-cache name="entity" mode="SYNC">
<                     <transaction mode="NON_XA"/>
---
>                 <local-cache name="local-query">
>                     <transaction mode="NONE"/>
216,217c163,164
<                 </invalidation-cache>
<                 <replicated-cache name="timestamps" mode="ASYNC">
---
>                 </local-cache>
>                 <local-cache name="timestamps">
220c167
<                 </replicated-cache>
---
>                 </local-cache>
229,231c176,178
<                         <core-threads count="10"/>
<                         <queue-length count="10" />
<                         <max-threads count="10" />
---
>                     <core-threads count="50"/>
>                     <queue-length count="50"/>
>                     <max-threads count="50"/>
235,237c182,184
<                         <core-threads count="10"/>
<                         <queue-length count="10" />
<                         <max-threads count="10" />
---
>                     <core-threads count="50"/>
>                     <queue-length count="50"/>
>                     <max-threads count="50"/>
243,275c190,192
<         <subsystem xmlns="urn:jboss:domain:jgroups:1.0" default-stack="tcp">
<             <stack name="tcp">
<                 <transport type="TCP" socket-binding="jgroups-tcp"> 
<                           <property name="external_addr">${env.OPENSHIFT_GEAR_DNS}</property>
<                     <property name="external_port">${env.OPENSHIFT_JBOSS_CLUSTER_PROXY_PORT}</property>
<                     <property name="bind_port">7600</property>
<                     <property name="bind_addr">${env.OPENSHIFT_INTERNAL_IP}</property>
<                 </transport>
<                 <protocol type="TCPPING">
<                           <property name="timeout">3000</property>
<                           <property name="initial_hosts">${env.OPENSHIFT_JBOSS_CLUSTER}</property>
<                           <property name="port_range">0</property>
<                           <property name="num_initial_members">1</property>
<                 </protocol>
<                 <protocol type="MERGE2"/>
<                 <protocol type="FD"/>
<                 <protocol type="VERIFY_SUSPECT"/>
<                 <protocol type="BARRIER"/>
<                 <protocol type="pbcast.NAKACK"/>
<                 <protocol type="UNICAST2"/>
<                 <protocol type="pbcast.STABLE"/>
<                 <protocol type="pbcast.GMS"/>
<                 <protocol type="UFC"/>
<                 <protocol type="MFC"/>
<                 <protocol type="FRAG2"/>
<                 <protocol type="AUTH">
<                         <property name="auth_class">org.jgroups.auth.MD5Token</property>
<                         <property name="token_hash">SHA</property>
<                         <property name="auth_value">${env.OPENSHIFT_JBOSS_CLUSTER}</property>
<                 </protocol>
<                 <!--protocol type="pbcast.STATE_TRANSFER"/>
<                 <protocol type="pbcast.FLUSH"/-->
<             </stack>
---
>         <subsystem xmlns="urn:jboss:domain:jmx:1.1">
>             <show-model value="true"/>
>             <remoting-connector/>
285a203,218
>         <subsystem xmlns="urn:jboss:domain:osgi:1.2" activation="lazy">
>             <properties>
>                 <!-- Specifies the beginning start level of the framework -->
>                 <property name="org.osgi.framework.startlevel.beginning">1</property>
>             </properties>
>             <capabilities>
>                 <!-- modules registered with the OSGi layer on startup -->
>                 <capability name="javax.servlet.api:v25"/>
>                 <capability name="javax.transaction.api"/>
>                 <!-- bundles started in startlevel 1 -->
>                 <capability name="org.apache.felix.log" startlevel="1"/>
>                 <capability name="org.jboss.osgi.logging" startlevel="1"/>
>                 <capability name="org.apache.felix.configadmin" startlevel="1"/>
>                 <capability name="org.jboss.as.osgi.configadmin" startlevel="1"/>
>             </capabilities>
>         </subsystem>
288c221
<             <connector name="remoting-connector" socket-binding="remoting"/>
---
>             <connector name="remoting-connector" socket-binding="remoting" security-realm="ApplicationRealm"/>
296c229,237
<                         <login-module code="UsersRoles" flag="required"/>
---
>                         <login-module code="Remoting" flag="optional">
>                             <module-option name="password-stacking" value="useFirstPass"/>
>                         </login-module>
>                         <login-module code="RealmUsersRoles" flag="required">
>                             <module-option name="usersProperties" value="${jboss.server.config.dir}/application-users.properties"/>
>                             <module-option name="rolesProperties" value="${jboss.server.config.dir}/application-roles.properties"/>
>                             <module-option name="realm" value="ApplicationRealm"/>
>                             <module-option name="password-stacking" value="useFirstPass"/>
>                         </login-module>
323c264
<             <virtual-server name="default-host" enable-welcome-root="false">
---
>             <virtual-server name="default-host" enable-welcome-root="true">
324a266
>                 <alias name="example.com"/>
326a269,278
>         <subsystem xmlns="urn:jboss:domain:webservices:1.1">
>             <modify-wsdl-address>true</modify-wsdl-address>
>             <wsdl-host>${jboss.bind.address:127.0.0.1}</wsdl-host>
>             <endpoint-config name="Standard-Endpoint-Config"/>
>             <endpoint-config name="Recording-Endpoint-Config">
>                 <pre-handler-chain name="recording-handlers" protocol-bindings="##SOAP11_HTTP ##SOAP11_HTTP_MTOM ##SOAP12_HTTP ##SOAP12_HTTP_MTOM">
>                     <handler name="RecordingHandler" class="org.jboss.ws.common.invocation.RecordingServerHandler"/>
>                 </pre-handler-chain>
>             </endpoint-config>
>         </subsystem>
332c284
<             <loopback-address value="${env.OPENSHIFT_INTERNAL_IP}"/>
---
>             <inet-address value="${jboss.bind.address.management:127.0.0.1}"/>
335c287
<             <loopback-address value="${env.OPENSHIFT_INTERNAL_IP}"/>
---
>             <inet-address value="${jboss.bind.address:127.0.0.1}"/>
342,344c294,297
<         <socket-binding name="jgroups-tcp" port="7600"/>
<         <!--socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
<         <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/-->
---
>         <socket-binding name="management-native" interface="management" port="${jboss.management.native.port:9999}"/>
>         <socket-binding name="management-http" interface="management" port="${jboss.management.http.port:9990}"/>
>         <socket-binding name="management-https" interface="management" port="${jboss.management.https.port:9443}"/>
>         <socket-binding name="osgi-http" interface="management" port="8090"/>
Categories: Companies

Spring Integration 2.2.0.M1 is released

SpringSource.org - 8 hours 15 min ago

We are pleased to announce the first milestone release of Spring Integration 2.2 stream - Spring Integration 2.2.0.M1.
Spring Integration provides an extension of the Spring programming model to support the well-known Enterprise Integration Patterns

Aside from the usual bug fixes this release brings quite a few new features and upgrades:

  • Dependency upgrades such as Spring 3.1.0.RELEASE, Spring AMQP 1.1.0.RELEASE, Spring Data Mongo 1.1.0.M1, Spring Gemfire 1.1.1.RELEASE
  • JPA support
  • Initial support for graceful shutdown of integration context
  • Support for 'Publisher Confirms and Returns' based on new features of Spring AMQP
  • etc.

This release also contains many improvements. You can see full release notes here

For more information about Spring Integration, refer to the project's home page

Categories: Open Source

When Licenses Meet Reality, the Result is Often Confusing

Sonatype Blog - 10 hours 49 min ago

One of my responsibilities at Sonatype is creating the pages that communicate licensing and security information in Nexus Professional and Insight for CI. We have a large team that is responsible for these pages and making sure that we’re providing accurate information. You would be surprised at the number of interesting edge cases that we identify in the process of scanning 400,000+ artifacts in Central. From invalid licenses to exotic, one-off licenses that include odd requirements, everyone who works on this team has had to become an expert in OSS licensing.

The following post about Meteor, a new, node.js-based approach to building web applications backed by MongoDB got my attention because it highlights some of the tricky integration issues we’ve had to think about when coming up with hypothetical use-cases for Insight. Here’s a quote that captures the complex relationships between Meteor, originally a GPL-licensed Javascript library, and an Apache-licensed library to access MongoDB:

From Olov Lassus’s popular blog post “Meteor meets NoGPLâ€

“The copyleft (viral, contaminating, whatever you want to call it) aspect of GPL is tricky. Take MongoDB as an example. Meteor uses it by importing the node-mongodb-native package (require(‘mongodb’)). That one is Apache 2.0 licensed, which is a permissive license that happens not to be compatible with Meteor’s GPL (v2) license, at least not according to the FSF. Tricky. Dependency chains, bindings between JS ↔ C and RPC makes it trickier even. I wouldn’t be surprised to see Meteor change to a GPL + a-bunch-of-OSS-exceptions license similar to what Qt and MySQL used to have, to avoid issues like this.â€

Don’t get me wrong, I’m not questioning the Meteor team’s right to choose whatever license they want, but I noticed this post because these are the kinds of relationships that we’ve been trying to sort out between different libraries in Central. We’ve encounter libraries that advertise themselves as BSD-style licenses which end up requiring dependencies on GPL components. This highlights the problem of licensing intent versus licensing reality. Just because a particular components is licensed under a particular license doesn’t mean you can actually use it under the terms of that license.

Lots of activity on Olov Lassus’ twitter feed and many opinions on the hacker news threads.  This one was good about the ambiguity of the GPL w.r.t. derivative works.

Note: Meteor has since changed the license to MIT, which makes this very interesting project that much more compelling to a wider audience.

Categories: Companies

Easy Unit and Integration Code Coverage

This example shows how to generate coverage for unit and integration tests using Maven and Sonar. It uses very simple techniques and should only take 10-15 minutes to get running in any existing Maven build. It can be used across unit, integration, ATDD or any other kind of test suite. The coverage results are shown in Sonar. Preview Text:  This...
Categories: Communities

Hyperlink for FreeMarker

Now that there's syntax coloring for FreeMarker, let's take a look at hyperlink support:

So, when there's an import statement, you can hold down the Ctrl key, and move the mouse over the file reference. When you do so, you automatically see a tooltip. The tooltip can be formatted via HTML, to create effects such as this:

You also see a hyperlink. Click the hyperlink and the referenced file opens.

For the first time I used org.netbeans.lib.editor.hyperlink.spi.HyperlinkProviderExt,  which I learned about from reading some NetBeans sources. The main thing it does for me is give me access to the tooltip.

Here's all the code:

import java.io.File;
import java.util.EnumSet;
import java.util.Set;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.swing.text.BadLocationException;
import javax.swing.text.Document;
import org.netbeans.api.editor.mimelookup.MimeRegistration;
import org.netbeans.lib.editor.hyperlink.spi.HyperlinkProviderExt;
import org.netbeans.lib.editor.hyperlink.spi.HyperlinkType;
import org.openide.awt.StatusDisplayer;
import org.openide.cookies.OpenCookie;
import org.openide.filesystems.FileObject;
import org.openide.filesystems.FileUtil;
import org.openide.loaders.DataObject;
import org.openide.loaders.DataObjectNotFoundException;
import org.openide.util.Exceptions;

@MimeRegistration(mimeType = "text/x-ftl", service = HyperlinkProviderExt.class)
public class FTLHyperlinkProvider implements HyperlinkProviderExt {
 
    private int startOffset, endOffset;
    private String identifier = ".*\\<#import (.*?) ";
 
    @Override
    public Set<HyperlinkType> getSupportedHyperlinkTypes() {
        return EnumSet.of(HyperlinkType.GO_TO_DECLARATION);
    }
 
    @Override
    public boolean isHyperlinkPoint(Document doc, int offset, HyperlinkType type) {
        return getHyperlinkSpan(doc, offset, type) != null;
    }
 
    @Override
    public int[] getHyperlinkSpan(Document doc, int offset, HyperlinkType type) {
        return getIdentifierSpan(doc, offset);
    }
 
    @Override
    public String getTooltipText(Document doc, int offset, HyperlinkType type) {
        String text = null;
        try {
            text = doc.getText(startOffset, endOffset - startOffset);
        } catch (BadLocationException ex) {
            Exceptions.printStackTrace(ex);
        }
        return "Click to open " + text;
    }
 
    @Override
    public void performClickAction(Document doc, int offset, HyperlinkType ht) {
        try {
            String text = doc.getText(startOffset, endOffset - startOffset);
            FileObject fo = getFileObject(doc);
            String pathToFileToOpen = fo.getParent().getPath()+text;
            File  fileToOpen = FileUtil.normalizeFile(new File(pathToFileToOpen));
            if (fileToOpen.exists()) {
                try {
                    FileObject foToOpen = FileUtil.toFileObject(fileToOpen);
                    DataObject.find(foToOpen).getLookup().lookup(OpenCookie.class).open();
                } catch (DataObjectNotFoundException ex) {
                    Exceptions.printStackTrace(ex);
                }
            } else {
                StatusDisplayer.getDefault().setStatusText(fileToOpen.getName() + " doesn't exist!");
            }
        } catch (BadLocationException ex) {
            Exceptions.printStackTrace(ex);
        }
    }
 
    private static FileObject getFileObject(Document doc) {
        DataObject od = (DataObject) doc.getProperty(Document.StreamDescriptionProperty);
        return od != null ? od.getPrimaryFile() : null;
    }
 
    private int[] getIdentifierSpan(Document doc, int offset) {
        Matcher matcher = null;
        try {
            matcher = Pattern.compile(identifier).matcher(doc.getText(0, doc.getLength()));
        } catch (BadLocationException ex) {
            Exceptions.printStackTrace(ex);
        }
        while (matcher.find()) {
            startOffset = matcher.start() + 10;
            endOffset = matcher.end() - 2;
            if (offset == startOffset) {
                try {
                    String text = doc.getText(startOffset, endOffset - startOffset);
                    return new int[]{offset, offset + text.length()};
                } catch (BadLocationException ex) {
                    Exceptions.printStackTrace(ex);
                }
            }
        }
        return null;
    }
 
}

The final method above would be better like this:

private int[] getIdentifierSpan(Document doc, int offset) {
    TokenHierarchy<?> th = TokenHierarchy.get(doc);
    TokenSequence ts = th.tokenSequence(Language.find("text/x-ftl"));
    if (ts == null) {
        return null;
    }
    ts.move(offset);
    if (!ts.moveNext()) {
        return null;
    }
    Token t = ts.token();
    if (t.id().name().equals("STRING_LITERAL")) {
        //Correction for quotation marks around the token:
        startOffset = ts.offset() + 1;
        endOffset = ts.offset() + t.length() - 1;
        //Check that the previous token was an import statement,
        //otherwise we don't want our string literal hyperlinked:
        ts.movePrevious();
        Token prevToken = ts.token();
        if (prevToken.id().name().equals("IMPORT")) {
            return new int[]{startOffset, endOffset};
        } else {
            return null;
        }
    }
    return null;
}

Thanks to NetBeans Dream Team member Emilian Bold for some advice and insights into this scenario, which is based on Hyperlink in a Plain Text File.

At this point, would be good to get a prioritized list of requirements from FreeMarker users out there.

Categories: Open Source

How to pick an ESB - Comparison Criteria

All Enterprise Service Bus (ESB) products may be used to build and deploy services, encapsulate legacy systems, route messages, transform message formats, and perform protocol mediation.  Many WSO2 prospects ask me ‘What differentiates WSO2 Enterprise Service Bus?’  This blog post shares my perspective and scales the conversation. Preview Text:  ...
Categories: Communities

5 Things Amazon Taught me About Deployment Automation

Early this week, I noticed a lightbulb went out and we were out of spares. Instead of adding a trip to the store to my todo list, my first instinct was to order a lightbulb off Amazon with two day shipping. That would be a little crazy if I didn’t have Amazon Prime. Preview Text:  Eric Minick gives us 5 takeaways we can learn about deployment...
Categories: Communities

Designing Search (Part 4): Displaying Results

In an earlier post we reviewed the various ways in which an information need may be articulated, focusing on its expression via some form of query. In this post we consider ways in which the response can be articulated, focusing on its expression as a set of search results. Preview Text:  In this post we consider ways in which the response can...
Categories: Communities

Scaling Android Emulator Size: Without using Eclipse

As you might have read following my previous post I'm currently experimenting with mobile web solutions. In such a case, having an Android emulator is quite comfortable for quickly testing your solution. Personally though, I hate the default emulator skin, mainly also because it takes up quite a large portion of your screen. Hence, I normally use a custom emulator skin. Preview...
Categories: Communities

Thursday Code Puzzler: Needles In the Haystack

By now you should be familiar with our Thursday Code Puzzler slot. The idea is simple: solve the coding problem as efficiently as you can, in any language or framework that you think is suitable. Note: Even though there really is nothing stopping you from finding a solution to this on the internet, try to keep honest, and come up with your own answer.  It's all about the participation!Find...
Categories: Communities

Starting Clojure

I’ve wanted to put together a long-form introductory Clojure screencast for some time.  I had an opportunity to do this in grand style yesterday in a live O’Reilly webcast, but, for various reasons, I wasn’t fond of how that came together.  So, I cut another live coding screencast that introduces, in various levels of detail:  Preview Text:  ...
Categories: Communities

JavaFX-Based SimpleDateFormat Demonstrator

One of the things that can be a little tricky for developers new to Java or even for experienced Java developers new to formatting with Java Dates, is the specification of a date/time format using SimpleDateFormat. The class-level Javadoc-based documentation for SimpleDateFormat is pretty thorough in its coverage of patterns representing various components of a date/time. Preview...
Categories: Communities

Android Action Bar Style Generator

Jeff Gilfelt (@readyState, http://jeffgilfelt.com/) just released a brilliant new tool for generating Android action bar styles. The online tool supports generating action bar styles for Android vanilla action bar as well as for ActionBarSherlock. Preview Text:  Jeff Gilfelt (@readyState, http://jeffgilfelt.com/) just released a brilliant new...
Categories: Communities

Spring AMQP 1.1.0 Released

SpringSource.org - Thu, 05/17/2012 - 00:47

Spring AMQP provides the familiar benefits of the Spring programming model to AMQP and, specifically, Rabbit MQ.

We are pleased to announce the general availability of the 1.1.0 release of spring-amqp for Java, which supports the RabbitMQ 2.8.x client, providing the following features...

  • Mirrored Queues
  • Broker Failover
  • Publisher Confirms
  • Returns
  • Federated Exchanges
  • ...and more

For more information, refer to the project home page.

The Spring Integration 2.2.0 Milestone 1 release supports the features of this spring-amqp release.

Categories: Open Source