A JBoss Project
Red Hat

Posts tagged with 'jbosscentral'

This post introduces the new service debugger for JBoss SwitchYard and provides the reader with an overview of SwitchYard’s capabilities, as demonstrated in its example “quickstart” programs.

To install this feature in Developer Studio 8 and JBoss Tools 4.2 you should enable 'Early Access' in Central and install the 'JBoss Integration and SOA Development' connector. See more in the Integration Stack Beta release blog.

Introduction

One of the most useful (and by the way, also one of the coolest) features of JBoss SwitchYard (http://switchyard.jboss.org/) is its graphical process editor. The editor enables you to create composite service definitions through a graphical interface, instead of having to directly edit cumbersome raw XML. For example:

debugger 1

The big blue box in the center window is called the canvas. Here’s where you can see the graphical representation of the service definition. With SwitchYard, it’s all about the services. With the SwitchYard editor, you can create the services, and not just edit Java source code.

What’s always been missing has been a corresponding tool for debugging SwitchYard Services. This gap is now being filled by the SwitchYard Debugger.

The SwitchYard Debugger

A debugger such as GDB provides you with the ability to interrupt a program’s execution through breakpoints so that you can examine code and data. In SwitchYard, however, you’re not just dealing with Java classes, you 're creating (and debugging) services. The SwitchYard debugger lets you add a breakpoint to any service or reference to a service. The debugger supports these actions:

  • Breakpoints can be configured to stop at various points in the execution chain, including service entry or transaction setup (entry, teardown, fault).

  • If you add a breakpoint on a service, the breakpoint will trigger for any reference or composite service invoking that service. In contrast, if you add a breakpoint on a service reference, it will only break when that reference is invoked.

  • You can also set breakpoints on a composite service to debug validators and transformers (both inbound and outbound). You would do this if you want to see what’s going through a particular transformer or validator which may be used by a number of interactions.

  • If you configure a breakpoint to break on transactions, it will break into the SwitchYard TransactionHandler.handleMessage() method. This generates a stack trace that includes SwitchYard details (for example, an Exchange) that are visible in the SwitchYard context view, so that you can examine elements such as message contents and context properties.

In contrast to a Java debugger, the SwitchYard debugger enables you to invoke breakpoints during steps (such as transformation) during the execution of the service, right in the service bus:

  • Breakpoints on component services and composite references (in other words, providers) will break anytime they are invoked, regardless of who is calling them.

  • Breakpoints on composite services and component references (in other words, consumers) will break whenever they call out.

  • So, if you’re having a problem with a service, putting a breakpoint in the service, will allow you to see what’s going in or out. If you’re having a problem with a component or endpoint, putting a breakpoint on a consumer will allow you to see what’s going in/out, and where it’s going.

  • With regard to the locations within a service (for example, transformation), if you have a specific problem, such as if you’re seeing policy exceptions or transactions aren’t working the way you expect, you can set it to break during the policy phase or the transaction phase to see just what’s going on (which policies are required, which are provided).

The best way to understand the new debugger is to see it in action. We’ll do this by using the debugger with SwichYard "quickStart" example programs. Let’s get started!

Getting SwitchYard

Before we can see the debugger in action, we have to install the SwitchYard runtime and its corresponding Eclipse tooling. Luckily, downloading and installing JBoss software* is quick and painless (and free!)

The steps to install the SwitchYard runtime are:

The steps to install SwitchYard’s Eclipse tooling are:

(We’re using the latest versions of the software available when this post is being written.)

The Quickstarts

One of the helpful features included with JBoss projects are example programs referred to as “quickstarts.” As the name implies, the goal of these examples is to help users get started quickly in learning technologies provided by JBoss projects. As we mentioned earlier in this post, the approach that we’ll take is to introduce a bugs into quickstarts, and then use the debugger to locate these bugs.

To introduce SwitchYard applications to new users, we’ll examine the first quickstart that we’ll use in some detail. If you are already familiar with SwitchYard applications, you can skip over this section of the post.

Let’s start by using the debugger to interrupt a running service in a quickStart and enable us to examine the data in a message being processed by the service. After this, we’ll take things one step further and introduce a bug into a service and then use the debugger to find the cause of the bug and work around it.

Looking under the Hood of a Quickstart

Before we examine how the debugger can be used with a quickStart we’ll take a look at how quickstarts are implemented and how to use the SwitchYard editor.

The first quickstart that we’ll run makes use of Apache Camel to implement content based routing to route messages to selected services. This quickstart is aptly named: rules-camel-cbr. Before we run the quickstart, let’s take a quick look at how it works.

To understand how the quickstart is constructed and how it works, we’ll examine it by looking at these 3 elements:

  • The quickstart’s service based design. We’ll look at this through the SwitchYard visual editor.

  • SwitchYard’s integration of camel routes with the quickstart’s services.

  • The support for testing that SwitchYard provides.

Let’s start by looking at the design of the quickstart application and its services.

To import the quickstart into our JBDS workspace, navigate to File→Import→Maven→Existing Maven Projects:

debugger 2

Browse to the quickstarts directory under the directory into which you installed SwitchYard, select the quickstart and it is imported.

debugger 3

The SwitchYard Service Editor

The SwitchYard graphical application editor enables you to create services and references to services, configure gateway bindings for all the protocols that SwitchYard supports, configure message transformers (to convert messages from one format to another), create skeletons of the classes, interfaces, and unit tests for your services.

The service definitions that you create in the editor are stored in a file named switchyard.xml. In the quickstart, this file is located in the src/main/resources/META-INF directory. All the quickstarts that we’ll use in this post follow this same pattern. Let’s open this file in the editor and take a look around.

debugger 4

To open the file in the editor, simple double-click on the switchyard.xml file’s icon. When the editor opens, here’s what we see:

debugger 5

The big blue box in the center window is called the canvas. Here’s where you can see the graphical representation of the service definitions:

debugger 6

At this point, we should take a moment to understand the graphical symbols that are used in the service definitions.

The visual elements defined in switchyard.xml conform to the OASIS Service Component Architecture Assembly Model Specification (http://docs.oasis-open.org/opencsa/sca-assembly/sca-assembly-spec-v1.1.html). The Service Component Architecture (SCA) model provides standards for building SOA applications.

A green chevron represents a service definition. The corresponding purple chevron represents a reference to a service. The blue rectangles are service components. These are containers that can hold implementations or one or more services through references.

Why was this standard selected as the lingua franca of SwitchYard configuration? What advantages does using this standard give us? There are multiple levels of advantages:

  • The SwitchYard team is using a modular approach that makes it easier to define and maintain a service’s configuration. A switchyard.xml can contain binding info in the same file as the service implementation, but SCA also supports recursive composition, so that one service with just implementation details, can be included inside another. We’ll take a look at the SCA files and pictures that Switchyard tooling makes easy to create and maintain.

  • SwitchYard also wanted to make service interface (or the service "contract") information more explicit, and therefore easier to find.

  • Finally, the SwitchYard team had a choice. They could create a new configuration syntax, or they could try to use something that already existed, was an accepted open standard, and was supported by a vibrant community. (They chose the latter.) Also, SCA is a well-known model for service-oriented applications. But, it’s important to not get too hung-up over the underlying configuration model. The capabilities that the model makes possible, such as modularity, are more important. And, another reason to not worry too much about the configuration model is that SwitchYard provides you with tools such as Forge scripting (and someday soon a SCA editor) to make it easier to create and maintain services' configurations.

The set of fundamental service definition symbols is defined in the OASIS Service Component Architecture Assembly Model Specification here: http://docs.oasis-open.org/opencsa/sca-assembly/sca-assembly-1.1-spec-CD-01.html#_Toc193601722

The other symbols relate to the SwitchYard-specific service implementations and bindings. For example, the RoutingService is implemented as a Camel XML service, the DestinationService is implemented as a JBoss Drools service, and the Red, Blue, and Green services are implemented as Java Bean services.

The full range of options supported by SwitchYard is displayed in the Palette view:

debugger 7

(Yes, it’s a long list. You have to scroll to see all the options.)

One thing to keep is that while this service definitions are persisted in an .xml file, and while you are able to view the contents of that file, you should not attempt to edit the raw XML in that file. The editor has built in protections to ensure that you do not create an invalid configuration. These protections are not in effect if you edit the raw XML directly. Accordingly, while we’ll examine both the information available to you in the graphical editor and the switchyard.xml file, we’ll focus on using the editor.

Let’s start by examining the application service design as presented by the editor, in the context of the application logic flow, then we’ll look a bit deeper into how you can create and manage the application design through the editor.

What happens in the quickstart is a three step process:

  • First, the incoming message is routed, by the RoutingService to the DestinationService

  • Second, the DestinationService uses JBossDrools to determine the correct destination for that message, based on the content in the message

  • Third, the RoutingServer then routes the message to the correct final destination (the Red, Green, or Blue service

How is this all accomplished? Let’s look at the RoutingService definition. Select the RoutingService in the diagram, open the Properties view and you’ll see this:

debugger 8

Remember that this service is a Camel XML service. The implementation of that route is defined in the route.xml file. The route definitions take the form of a Spring DSL. (See http://camel.apache.org/spring-xml-extensions.html for more details.)

The contents of this file are pretty self-explanatory as the destination color determines the ultimate destination. For example:

<from uri="switchyard://RoutingService"/>
<to uri="switchyard://DestinationService"/>
  <choice>
    <when>
        <simple>${body.destination} == 'Red'</simple>
    <to uri="switchyard://RedService"/>

SwitchYard and Routing With Camel (with help from JBoss Drools)

What happens when the quickstart processes a message is:

First, the incoming message is routed, by the RoutingService to the DestinationService.

As seen in route.xml:

    <from uri="switchyard://RoutingService"/>
    <to uri="switchyard://DestinationService”/>

Let’s look at the DestinationService definition. Select the DestinationService in the diagram, open the Properties view and you’ll see this:

debugger 9

Then, the DestinationService service uses an MVEL statement to find the Widget class’s ID, and rules defined in JBoss Drools (remember that this service is implemented as a JBoss Drools service) to set the Destination value:

As seen in DestinationServiceRules.drl:

rule "Red Destination"
    when
        $widget : Widget(id matches "FF0000-.*")
    then
        $widget.getBox().setDestination("Red");
end

Then, the route logic continues in a structure to route the message to the correct destination:

OK. We have the Destination value set in each widget. But, how does the widget get routed to the correct destination?

Camel provides a Java DSL (Domain Specific Language) to implement routes. In the DSL, a camel route contains a source ("from") and a destination ("to). These reference the RoutingService and DestinationService interfaces that we just saw in the SwitchYard editor.

In the case of the quickstart, the route definitions take the form of a Spring DSL. The route is self-explanatory, even if you do not have experience with Camel. The destination service is selected based on the content; Red, Green, or Blue.

Test Support in SwitchYard

There’s just one more thing we have to look at before we run the quickstart - how to start the chain reaction of tasks that the quickstart will perform.

Testing server-side applications such as those built with SwitchYard can be difficult. Since this is server-side software, you have to install and run a server, the application has to be deployed to that server, and then you have to construct a client to access the application on the server. You can end up in a situation where you have to build either a throwaway test client, or a reusable test framework. Either way, you have to invest time and effort into building something other than your application.

Luckily, JBoss SwitchYard provides a built in framework that makes testing your applications fast and easy. This QuickStart makes use of the SwitchYardRunner class. SwitchYardRunner is a JUnit Runner class, but more than that, it starts up an embedded SwitchYard runtime. When this embedded runtime starts, your application is packaged up as a SwitchYard application that is deployed to the test instance.

To make use of SwitchYard’s test support, all you have to do is to annotate the test with the SwitchYardRunner JUnit test Runner class. This class will startup an embedded SwitchYard runtime, one for each test method, and then package up the test into a SwitchYard application and deploy that application to the runtime.

In addition to the SwitchYardRunner class, SwitchYard also makes testing easy by providing the TestMixIn feature. TestMixIns enable to turn on additional test support, based on the specific needs of your application. This quickstart makes use of the CDIMixIn to register its bean services. Some of the other TestMixIns support testing http services, JBoss Smooks transformations, and JMS services.

Building, Deploying, and Running the Quickstart

OK, enough talk. Let’s run the quickstart.

First, deploy the quickstart to a SwitchYard server. In JBDS, this is a simple task. It can be done with the server either started or stopped, but let’s start the server first so that you more easily spot the server logging messages when the quickstart is deployed.

To start the server, select it in the “servers” view, and press the start button.

debugger 10

The server console window will open, and you should see something like this:

21:21:59,145 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015961: Http management interface listening on http://127.0.0.1:9990/management
21:21:59,146 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015951: Admin console listening on http://127.0.0.1:9990
21:21:59,146 INFO  [org.jboss.as] (Controller Boot Thread) JBAS015874: WildFly 8.0.0.Final "WildFly" started in 4060ms

Then, to deploy the quickstart, select the server in the “servers” view again, right-click, select “Add/Remove Applications” and select the quickstart.

debugger 11

Switch back to the console view and you should see something like this:

INFO [org.jboss.as.server] (DeploymentScanner-threads - 1) JBAS018559: Deployed "switchyard-quickstart-rules-camel-cbr.jar" (runtime-name : "switchyard-quickstart-rules-camel-cbr.jar")

To run the client test program, select the rules-camel-cbr/src/test/java/org/switchyard/quickstarts/rules/camel/cbr/RulesCamelCBRTest.java Java source file, and run it as a JUnit test.

Switch back to the server console, and you’ll see the quick start’s output!

INFO  [org.switchyard.quickstarts.rules.camel.cbr.RedServiceBean] Red service processing boxed widget with id: FF0000-ABC-123
INFO  [org.switchyard.quickstarts.rules.camel.cbr.GreenServiceBean] Green service processing boxed widget with id: 00FF00-DEF-456
INFO  [org.switchyard.quickstarts.rules.camel.cbr.BlueServiceBean] Blue service processing boxed widget with id: 0000FF-GHI-789

And the green bar appears!

debugger 12

Now, we’ll use the debugger to interrupt a running service in a QuickStart and enable us to examine the data in a message being processed by the service. After this, we’ll take things one step further and introduce a bug into a service and then use the debugger to find that bug.

Setting a Breakpoint in the Debugger

Let’s start by setting a breakpoint on the Blue service. We’ll use this breakpoint to enable us to view the contents of the message received by the service. For the purposes of our first example, we’ll use the Blue service.

To set a breakpoint in the SwitchYard editor, first position the cursor over the service’s green chevron icon. A small palette of icons is displayed:

debugger 13

To set a breakpoint on the service, select the eyeglasses icon. The presence of this icon on a service definition as seen in the SwitchYard editor indicates that a breakpoint is set:

debugger 14

Notes that as we are adding a breakpoint on the service, the breakpoint will trigger for any reference or composite service invoking that service. In contrast, if you add a breakpoint on a service reference, it will only break when that reference is invoked.

To view and modify the breakpoint’s properties, open the Debug perspective and look in the breakpoints view:

debugger 15

And then right-click on the breakpoint, to view and edit the breakpoint’s properties:

debugger 16

For our example, we’ll use the default properties. We’re mainly concerned with the breakpoint being triggered at service entry.

Now that our breakpoint has been defined, let’s run the RulesCamelCBRTest program again.

To run the test with the debugger, right-click on RulesCamelCBRTest, select Debug As→JUnit Test:

debugger 17

When the breakpoint is reached, the program is suspended. If we look in the Variables view in the Debug perspective, we can see the incoming message and the values that controlled the content-based routing of a message to the Blue service:

debugger 18

Now that we’ve seen the quickstart run correctly, it’s time to introduce a bug, and then use the debugger to find it. For this illustration, we’ll use a different quickstart.

Giving a Quickstart a Bug

Remember the scene in the movie “Independence Day,” when Will Smith uploads a software virus into the evil aliens’ spaceship? Let’s do something similar and add a bug into a quickstart, and then use the debugger to find the bug and even fix it.

Some of the types of bugs that you have to deal with in a services and message based system involve when there are problems in the content in the messages, and how the services are (or are not) able to handle those problems. What sorts of bad things can happen to good messages? Missing a field, wrong namespace, malformed XML, errors in the headers, etc. The debugger makes it possible to tweak a message to debug a problem, without having to redeploy the service.

The quickstart that we’ll look at is “validate-xml.” This quickstart demonstrates the SwitchYard XML validator. The quickstart deploys a service that accepts a message and returns an object that is transformed with XLST. The incoming message is checked for XML validity, so that malformed messages are caught. Before we can run the quickstart, it must be deployed in the same manner as the rules-camel-cbr quickstart that we looked at earlier in this article.

The quickstart’s application diagram is very simple as only one service (“OrderService”) is implemented. This service only accepts a message and returns an object that is processed by the XLST transformer, but it’s adequate for our purposes. The diagram looks like this:

debugger 19

The test application that we want to run is: validate-xml/src/test/java/org/switchyard/quickstarts/validate/xml/WebServiceTest.java

This application executes separate two Junit tests. First, it verifies that a properly formatted SOAP message can be transformed and validated, and then it verifies that an intentionally malformed SOAP message (that is, a message that contains invalid XML) is caught.

Before we look at causing and catching a bug, let’s examine the message tansformation that is performed by this quickstart. The transformation is performed with the order.xslt file in the quickstart. It’s a simple transformation in that it transforms incoming messages that look like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
  <orders:order xmlns:orders="urn:switchyard-quickstart:validate-xml:0.1.0">
     <orderId>PO-19838-XYZ</orderId>
     <itemId>BUTTER</itemId>
     <quantity>200</quantity>
  </orders:order>
  </soapenv:Body>
</soapenv:Envelope>

Into objects that look like this:

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Header/>
  <SOAP-ENV:Body>
  <orders:orderAck xmlns:orders="urn:switchyard-quickstart:validate-xml:0.1.0">
     <orderId>PO-19838-XYZ</orderId>
     <accepted>true</accepted>
     <status>Order Accepted</status>
  </orders:orderAck>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The change simply indicates whether the incoming order was accepted.

If we set our breakpoint on the “OrderService” service:

debugger 20

And then run/debug the WebServiceTest, we can view the message, before and after its transformation, in the debugger. Here’s the message before transformation:

debugger 21

And here’s the message after its transformation:

debugger 22

The second test in the WebServiceTest intentionally sends a message that includes an invalid XML element.

The invalid SOAP message looks like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
  <soapenv:Header/>
  <soapenv:Body>
  <orders:order xmlns:orders="urn:switchyard-quickstart:validate-xml:0.1.0">
     <orderId>PO-19838-XYZ</orderId>
     <itemId>BUTTER</itemId>
     <quantity>200</quantity>
     <invalid-element>This element is not allowed by XML Schema.</invalid-element>
  </orders:order>
  </soapenv:Body>
</soapenv:Envelope>

Yes, it’s easy to spot the invalid XML. ;-)

Let’s expand on this test application a bit and alter it to not gracefully trap the error resulting from the invalid XML. To do this, we’ll edit the invokeOrderWebServiceValidationFail() method and change this:

Assert.assertTrue("Unexpected response: " + response, response.contains("1 validation error(s)") && response.contains("invalid-element"));

To this:

Assert.assertFalse("Unexpected response: " + response, response.contains("1 validation error(s)") && response.contains("invalid-element"));

So that when we run the test, we see this JUnit error:

java.lang.AssertionError: Unexpected response: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><soap:Fault><faultcode>soap:Server</faultcode><faultstring>SWITCHYARD014000: Validator 'org.switchyard.validate.xml.internal.XmlValidator' failed: 1 validation error(s):
org.xml.sax.SAXParseException: cvc-complex-type.2.4.d: Invalid content was found starting with element 'invalid-element'. No child element is expected at this point.
</faultstring></soap:Fault></soap:Body></soap:Envelope>

Before we can debug the OrderService, we must set our breakpoint:

debugger 23

Then we edit the breakpoint’s properties. For our example, we want the trigger to be set for the validation of incoming messages:

debugger 24

When we run/debug the WebServiceTest program, the breakpoint is reached and we can examine the message contents:

debugger 25

And, there’s the invalid XML element. What makes the debugger especially useful is that we can now edit the message and remove the invalid XML:

debugger 26

And then allow the program to resume its operation. In this way, we can determine if the program has any other bugs before we correct the cause of the invalid XML, redeploy, etc.

In Conclusion

We’ve taken an introductory look at the new SwitchYard debugger in this article. The debugger enables you to debug not just a class or method, but a Switchyard service. The debugger is configured through the SwitchYard graphical service/application editor and enables you to both monitor and control the operation of a service to make it easier for you to find those pesky bugs and is a great addition to the SwitchYard developer toolkit.

Acknowledgements

The author would like to thank Rob Cernich for his input and reviews of the article as it was being written, Keith Babo for his background on the SwitchYard editor, and Jiri Sedlacek for his painstaking review of my sometimes suspect grammar. (Many thanks!)

References

JBoss Tools Integration Stack 4.2.0.Beta1 / JBoss Developer Studio Integration Stack 8.0.0.Beta1

jbosstools jbdevstudio blog header

The Integration Stack for JBoss Tools Developer Studio is a set of plugins for Eclipse that provides tooling for the following frameworks.

JBoss Business Process and Rules Development

  • BPEL Designer - Orchestrating your business processes.

  • BPMN2 Modeler - A graphical modeling tool which allows creation and editing of Business Process Modeling Notation diagrams using graphiti.

  • Drools - A Business Logic integration Platform which provides a unified and integrated platform for Rules, Workflow and Event Processing.

  • jBPM - A flexible Business Process Management (BPM) suite.

JBoss Data Virtualization Development

  • Modeshape - A distributed, hierarchical, transactional and consistent data store with support for queries, full-text search, events, versioning, references, and flexible and dynamic schemas. It is very fast, highly available, extremely scalable, and it is 100% open source.

  • Teiid Designer - A visual tool that enables rapid, model-driven definition, integration, management and testing of data services without programming using the Teiid runtime framework.

JBoss Integration and SOA Development

  • All of the Business Process and Rules Development plugins, plus…​

  • Fuse Apache Camel Tooling - A graphical tool for integrating software components that works with Apache ServiceMix, Apache ActiveMQ, Apache Camel and the FuseSource distributions.

  • SwitchYard - A lightweight service delivery framework providing full lifecycle support for developing, deploying, and managing service-oriented applications.

SOA 5.x Development

  • JBoss ESB - An enterprise service bus for connecting enterprise applications and services.

  • jBPM3 - A flexible Business Process Management (BPM) Suite - JBoss Enterprise SOA Platform 5.3.x compatible version.

All of these components have been verified to work with the same dependencies as JBoss Tools 4.2 and Developer Studio 8.

Installation

To install the Integration Stack tools, first install JBoss Developer Studio from the all-in-one installer, bundled and configured out of the box with everything you need to get started. Alternatively, if you already have eclipse-jee-luna installed, you can install JBoss Developer Studio or JBoss Tools from the Eclipse Marketplace via Help > Eclipse Marketplace…​

jbtis luna em

Once Developer Studio is installed, restart Eclipse and select the Software/Update tab in the JBoss Central view. The current 8.0.0.Beta1 integration stack is available as "Early Access" so you must check the "Enable Early Access" checkbox in the installer window. Select the items you’d like to install:

jbdsis ea

The standard p2 installer is available for JBDSIS. Simply start jbdevstudio or eclipse-with-jbds, then:

       Help > Install New Software...
       Add...
       - use this for 'Location:'
         https://devstudio.redhat.com/updates/8.0-development/integration-stack/

The community JBoss Tools Integration Stack (JBTIS) installation is easy as well. If you already have eclipse-jee-luna installed, install JBoss Tools from the Eclipse Marketplace via Help > Eclipse Marketplace…​

jbtis luna em

Once JBoss Tools is installed, restart Eclipse and select the Software/Update tab in the JBoss Central view. The current 4.2.0.Beta1 integration stack is available as "Early Access" so you must check the "Enable Early Access" checkbox in the installer window. Select the items you’d like to install:

jbtis ea

The standard p2 installer is available for JBTIS. Simply start eclipse-with-jbt, then:

       Help > Install New Software...
       Add...
       - use this for 'Location:'
         http://download.jboss.org/jbosstools/updates/development/luna/integration-stack/

Note: If you installed into your own Eclipse you should bump up the launch resource parameters:

--launcher.XXMaxPermSize 256m --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms512m -Xmx1024m

What’s Been Updated?

This is a Beta1 release so some things are in flux but virtually every component has something new or updated. Here’s a small list of what’s new:

Fuse Tooling

  • Improved server adapters for JBoss Fuse Tooling. More logical deployment and publishing of your projects from the Servers view.

  • There’s new Camel route debug support in the Fuse Camel route editor.

See Lars Heinemann’s Blog for more insights.

Teiid Designer

Three releases for Teiid Designer, see Teiid Designer 8.4, Teiid Designer 8.5 and Teiid Designer 8.6 What’s New.

Keep up to date with the JBoss Tools home

Don’t miss the Features tab for up to date information on your favorite Integration Stack component!

The day has finally come!

JBoss Tools 4.2 and Red Hat JBoss Developer Studio 8 for Eclipse Luna is now available.

JBoss Developer Studio 8 Splashscreen

Installation

JBoss Developer Studio comes with everything pre-bundled in its installer. Simply download it and install it like this:

java -jar jboss-devstudio-{version}-installer-{standalone|eap}.jar

JBoss Tools or JBoss Developer Studio Bring-Your-Own-Eclipse (BYOE) requires a bit more:

This release requires at least Eclipse 4.4 (Luna) but we recommend using the Eclipse Luna SR1 Java EE Bundle since then you get most of the dependencies preinstalled.

Once you have installed Eclipse, you can either find us on Eclipse Marketplace under "JBoss Tools (Luna)" or "JBoss Developer Studio (Luna)".

For JBoss Tools you can also use our update site directly if you are up for it.

http://download.jboss.org/jbosstools/updates/stable/luna/

What is new ?

There have been many feature additions and a lot of bugfixing polish going into this main release and these have been documented/described in details at What’s New.

The main headlines are:

Where is integration stack tooling ?

The integration stack covers the tooling for Fuse, Drools, jBPM, SwitchYard, JBoss ESB etc.

I’m happy to announce that we for now have made them available as "Early access" in JBoss Tools under JBoss Central Software/Update page.

In the near future it is planned to also show up in JBoss Developer Studio and eventually be available as fully supported.

Thank You!

This release would not have been possible without feedback and contributions from our community and the team(s) around Developer Studio. For that I’m truly grateful. Any contribution counts!

The following people have participated in this release with either code, ideas, feedback and testing:

Alexander Silgidjian, Alexey Pakseykin, Andrei Ivanov, Andy Goldstein, Antonio Goncalves, Asif Kilwani, Axel Wathne, Chris West, Chunyun Chen, Clovis Seragiotto, Cody Lerum, Cojan van Ballegooijen, Daniel Castro, Daniel Cunha, Daniel Dekany, Darren hartford, Darryl Miles, Eduardo de souza, Emily Brand, Ender Wiggin, Eric Barber, Filippo rossoni, Guillaume Jouvelot, Harald Wellmann, Henk de boer, Hermes Waldemarin, Hernán Chanfreau, Igor Jacy Lino Campista, Jeffrey Simpson, Jesper Skov, Jim Boettcher, Joe Guzzardo, Jorge Yagüe París, Josh B, Juergen Zimmermann, Karl Pietrzak, Labdoui labdoui, Luke Maurer, Marcel Neuwohner, Martin Lippert, Masao Kunii, Mikhail Kalkov, Nan wei, Nero M, Nicolas duminil, Oliver Pfau, Palmer Eldritch, Patrick Decat, Paul Richardson, Pei-Tang Huang, Radosław Józwik, Rainer Schön, Randall Smith, Rich DiCroce, Robert Baty, Robert Munteanu, Roman Ilin, Ron Ratovsky, Sebastien Deleuze, Stephen Neal, Suz Dorfield, Sébastien Pinel, Tagir Valeev, Thiago andrade, Thomas Maslen, Weiweijiang jiang, Wolfgang Knauf, Zerr Angelo, Alexander Kurtakov, Alexey Kazakov, Aliaksey Nis, Andre Dietisheim, Andrea Vibelli, Andrej Podhradsky, Arun Gupta, Aslak Knutsen, Barry LaFond, Boleslaw Dawidowicz, Brenton Leanhardt, Brian Fitzpatrick, Burr Sutter, Catherine Robson, Corey Daley, Daniel Azarov, David Chia, David Hladky, David Stephan, Denis Golovin, Denis Maliarevich, Duncan Doyle, Emil Cervenan, Emmanuel Bernard, Eric Rich, Fred Bricon, Gavin King, George Gastaldi, Gorkem Ercan, Ilya Buziuk, Isaac Rooskov, Jakub Niedermertl, James Cobb, Jane Murphey, Jaroslav Jankovič, Jeff Cantrill, Jim Tyrrell, Jiri Pallich, Jiri Peterka, Joshua Wilson, Juraci Paixão Kröhling, Juraj Húska, Karel Piwko, Koen Aers, Konstantin Marmalyukov, Krzysztof Daniel, Lars Heinemann, Len DiMaggio, Lincoln Baxter III, Lucia Jelinkova, Lukáš Fryč, Marek Novotny, Marek Schmidt, Marius Bogoevici, Marián Labuda, Martin Malina, Matthias Wessendorf, Max Rydahl Andersen, Maxim Areshkau, Michelle Murray, Mickael Istria, Mustafa Musaji, Nick Boldt, Paul Leacu, Pavol Srna, Pete Muir, Peter Palaga, Petr Stribny, Petr Suchý, Radim Hopp, Radoslav Rábara, Rafael Benevides, Rastislav Wagner, Rick Wagner, Rob Cernich, Rob Stryker, Robb Greathouse, Ron Šmeral, Sande Gilda, Sebastien Blanc, Snjezana Peco, Stefan Bunciak, Ståle Pedersen, Tadeas Kriz, Takayuki Konishi, Tomas Repel, Tomáš Sedmík, Travis Rogers, Van Halbert, Viacheslav Kabanovich, Victor Rubezhny, Vineet Reynolds, Vitali Yemialyanchyk, Vladimir Vasilev, Vlado Pakan, Vojtech Juranek, Xavier Coulon and Yahor Radtsevich.

Thank you!

If you like to be part of shaping the next update and major release please take a look at JBoss Tools Community Acceptance program! It will start up soon!

Hope you enjoy this release and remember…​

Have fun!

Max Rydahl Andersen+ @maxandersen

Maintenance update of your favorite integration tools.

jbosstools jbdevstudio blog header

The Integration Stack for JBoss Tools Developer Studio is a set of plugins for Eclipse that provides tooling for the following frameworks:

  • BPEL Designer - Orchestrating your business processes.

  • BPMN2 Modeler - A graphical modeling tool which allows creation and editing of Business Process Modeling Notation diagrams using graphiti.

  • Drools - A Business Logic integration Platform which provides a unified and integrated platform for Rules, Workflow and Event Processing.

  • JBoss ESB - An enterprise service bus for connecting enterprise applications and services.

  • Fuse Apache Camel Tooling - A graphical tool for integrating software components that works with Apache ServiceMix, Apache ActiveMQ, Apache Camel and the FuseSource distributions.

  • jBPM3 - A flexible Business Process Management (BPM) Suite - JBoss Enterprise SOA Platform 5.3.x compatible version.

  • Modeshape - A distributed, hierarchical, transactional and consistent data store with support for queries, full-text search, events, versioning, references, and flexible and dynamic schemas. It is very fast, highly available, extremely scalable, and it is 100% open source.

  • SwitchYard - A lightweight service delivery framework providing full lifecycle support for developing, deploying, and managing service-oriented applications.

  • Teiid Designer - A visual tool that enables rapid, model-driven definition, integration, management and testing of data services without programming using the Teiid runtime framework.

All of these components have been verified to work with the same dependencies as JBoss Tools 4.1 and Developer Studio 7, so installation is easy.

Installation

To install the Integration Stack tools, first install JBoss Developer Studio from the all-in-one installer, bundled and configured out of the box with everything you need to get started. Alternatively, if you already have eclipse-jee-kepler installed, you can install JBoss Developer Studio or JBoss Tools from the Eclipse Marketplace via Help > Eclipse Marketplace…​

jbtis b1

Once Developer Studio is installed, restart Eclipse and select the Software/Update tab in the JBoss Central view and look for the JBoss Developer Studio Integration Stack installation section. Select the items you’d like to install:

jbtis b2

The community JBoss Tools Integration Stack URL is:

Note: If you installed into your own Eclipse you should bump up the launch resource parameters:

--launcher.XXMaxPermSize 256m --launcher.appendVmargs -vmargs -Dosgi.requiredJavaVersion=1.6 -XX:MaxPermSize=256m -Xms512m -Xmx1024m

What’s Been Updated?

Fix release versions of Fuse Tooling 7.2.2, jBPM/Drools 6.1.0 and Teiid Designer 8.3.4. Also - there are updated ESB 1.5.310.Final project examples. Look for specific bug fixes in the Release Notes.

Keep up to date with the JBoss Tools home

Don’t miss the new Features tab for up to date information on your favorite Integration Stack component !

I did not make it to EclipseCon 2014 since I was enjoying my new found Fatherhood too much.

Thus I was happy when I got invited on board the EclipseCon Program Committee by Martin Lippert (Pivotal) to not only have a new reason to go to EclipseCon but also help form next years conference.

To kickstart forming next year conference the Call For Papers are now open!

EclipseCon 2015 is to be held March 9 - 12 in (sometimes) sunny California at the Hyatt Regency San Francisco Airport.

I look forward to what we will get to see of talks - and I hear it will be not so fun trying to filter everything down but I’m up for a new kind of challenge.

See you in the CfP’s and remember…​Have fun!

Max Rydahl Andersen
@maxandersen

Happy to announce JBoss Tools 4.2 CR1 and Red Hat JBoss Developer Studio 8 CR1 for Eclipse Luna is now available.

JBoss Developer Studio 8 Splashscreen

Installation

JBoss Developer Studio comes with everything pre-bundled in its installer. Simply download it and install it like this:

java -jar jboss-devstudio-{version}-installer-{standalone|eap}.jar

JBoss Tools or JBoss Developer Studio Bring-Your-Own-Eclipse (BYOE) requires a bit more:

This release requires at least Eclipse 4.4 (Luna) but we recommend using the Eclipse 4.4 JEE Bundle since then you get most of the dependencies preinstalled.

Once you have installed Eclipse, you either find us on Eclipse Marketplace under "JBoss Tools (Luna)" or "JBoss Developer Studio (Luna)".

For JBoss Tools you can also use our update site directly if you are up for it.

http://download.jboss.org/jbosstools/updates/development/luna/

Note: Integration Stack tooling will become available from JBoss Central at a later date.

What is new ?

This release is mainly a big set of bug fixes but we managed to slip in a bunch of new features too.

Hotcode replace aware server adapter

Ever been annoyed by Eclipse’s "Hot Code Replace Failed" dialog and how it only offers you to Continue, Terminate or fully restart your running VM ?

Ever wonder why Eclipse couldn’t just restart your deployed modules and let you continue working without have to wait for a restart of the application server + your own application ?

If you can answer yes to the above, then you will be happy to hear we now support this.

JBIDE 18094a

Now, if you run a server in Debug mode and a hot code replace fails due to some class or jar changes, the dialog above will appear, giving you the option to restart the modules, terminate the server, restart the server, or just continue as if nothing happened.

But beyond this, it also offer you the option to "Remember this choice for this server", allowing you to click "Restart modules" once and then all subsequent hot code replace failures will automatically trigger a restart of just the modules.

This is probably my personal most wanted feature improvement in years - sorry for it to take so long but please do enjoy it now.

Hibernate Tools "rewired"

To support the latest Hibernate 4.3 and JPA 2.1 releases, we had to "rewire" large part of Hibernate Tools' internals. In the past Hibernate 3.6 was hardwired to be used for loading users mapping configurations for the UI - that is no longer the case. The configured version for your console configuration is now used everywhere instead of only for codegeneration.

I’ll spare you from the details here but just outline that the rewiring has been completed and we now support Hibernate 4.3 and JPA 2.1. But beyond that, previous versions should be much more stable now too!

If you do find discrepancies in this area, please let us know by opening a bug report.

New AngularJS Forge wizard

JBoss Central now features a new AngularJS with Forge project wizard to let you kickstart new JavaEE based applications almost from scratch, using the powerful JBoss Forge scaffolding capabilities.

new forge wizard

You will be asked to install Forge Tools, if it is not already installed. The wizard will also recommend you to install the AngularJS tooling.

Once you create the project skeleton from the new wizard, a cheatsheet will open and will guide you through the different steps necessary to use JBoss Forge and scaffold REST endpoints and a UI layer based on AngularJS.

Please be aware that if you enable "Early Access" on JBoss Central you will get even better AngularJS suport (see below).

Updated AngularJS tooling

AngularJS IDE v.0.5.0 is now available in JBoss Central Early Access (go to the software/updates page in JBoss Central and click on the Early Access checkbox). Biggest change here is that the Angular JS editor is no longer needed and has been removed. Instead, content assist, code highlighting and easy navigation for AngularJS are now available from the standard and JBoss Tools HTML editors.

angular

More Ionic goodies for mobile development

More widget components have been added to the Ionic Palette for HTML5 files. See the New and Noteworthy page for a complete list of newly available widgets.

palette

When an Ionic widget is added to an HTML file, the links to Ionic JS/CSS CDN resources may also be created automatically.

ionic js

Content assist (Ctrl+Space) for <ion-*> tags and their attributes is now supported by the JBoss Tools HTML editor.

ionic ca

Pom properties activated m2e configurators

JBoss project configurators for m2e now support an activation property in the <properties> section of pom.xml. Expected values are true/false and override the workspace-wide preferences found under Preferences > JBoss Tools > JBoss Maven Integration.

Available properties are :

  • <m2e.cdi.activation>true</m2e.cdi.activation> for the CDI Project configurator,

  • <m2e.seam.activation>true</m2e.seam.activation> for the Seam Project configurator,

  • <m2e.hibernate.activation>true</m2e.hibernate.activation> for the Hibernate Project configurator,

  • <m2e.portlet.activation>true</m2e.portlet.activation> for the Portlet Project configurator.

Using these are good if you find our automatic detection is too eager or too weak in finding that you need the plugins setup for CDI, Seam, Hibernate or Portlet features.

The pom.xml editor also provides matching XML templates for these properties, when doing ctrl+space in the <properties> section.

…​and more

There are more improvements covered in the more details: What’s New.

What is Next

The next release is set to be the last candidate release, so please, do try this one out and give feedback to make sure you’ll have a good experience with JBoss Tools on Eclipse Luna!

Let us know what you think in the comments below!

Hope you enjoy it and remember…​

Have fun!

Max Rydahl Andersen & Fred Bricon
@maxandersen @fbricon

A few days ago we released JBoss Tools 4.2 Beta3 for Eclipse Luna.

In that update was also a change to our update site urls that we recommend for testing our Nightly builds.

In the past if you used http://download.jboss.org/jbosstools/updates/nightly/core/master/ we recommend you start using the following instead:

Note the 'luna' segment in the URL above indicates this site targets Eclipse 4.4 (Luna). Once we begin building on Eclipse 4.5 (Mars), there will be a new URL with a 'mars' segment.

Why the change ?

To understand why we are changing it its good to try understand how our builds for JBoss Tools is setup to have commits in builds be picked up by Jenkins which then publishes the result to our nightly build update sites.

The following picture is a simplification of the process and how the bits moves through the various sites and gets community tested.

nightly development stable

We have ~40 repositories with more or less independent plugin sets in our Github jbosstools organization. When these change we build an update site for each of them and when one is built the content gets aggregated into an "uber" jbosstools update site.

In the beginning this was not a big problem but over the years with more traffic and more frequent builds users risk having update errors because during their update the build from which they were updating could be overwritten with a newer one.

To remedy this we now offer a composite of the latest nightly builds instead. This means that parsing the site’s metadata will be slightly slower but after that the download speed will be the same, and you should now rarely encounter the above issue.

Another advantage is that with this site you can now revert to an earlier nightly build, in case that works better.

Thus, in short - if you are willing to test our JBoss Tools nightly builds - please use this as your update site:

Talking about nightly builds…​

If you are trying out latest nightly builds why not signup as part of JBoss Tools CAT member and help by giving us feedback to know if we are going in the right direction ?

To do this start here.

Have fun!

Max Rydahl Andersen
@maxandersen

Happy to announce JBoss Tools 4.2 Beta3 and Red Hat JBoss Developer Studio 8 Beta3 for Eclipse Luna is now available.

JBoss Developer Studio 8 Splashscreen

Installation

JBoss Developer Studio comes with everything pre-bundled in its installer. Simply download it and install it like this:

java -jar jboss-devstudio-{version}-installer-{standalone|eap}.jar

JBoss Tools or JBoss Developer Studio Bring-Your-Own-Eclipse (BYOE) requires a bit more:

This release requires at least Eclipse 4.4 (Luna) but we recommend using the Eclipse 4.4 JEE Bundle since then you get most of the dependencies preinstalled.

Once you have installed Eclipse, you either find us on Eclipse Marketplace under "JBoss Tools (Luna)" or "JBoss Developer Studio (Luna)".

For JBoss Tools you can also use our update site directly if you are up for it.

http://download.jboss.org/jbosstools/updates/development/luna/

Note: Integration Stack tooling will become available from JBoss Central at a later date.

What is new ?

This release is mainly a bunch of bug fixes but also a few new features and a very important regression fix.

Better Plugin Management for Apache Cordova

Our Hybrid Mobile Tools now supports automatically downloading the plugins listed in your config.xml giving you two benefits:

  1. Allow you to exclude the physical plugin binaries from your source control

  2. On import the right plugin will be fetched dynamically, great for sharing examples and code.

Also don’t forget we have proposed and contributed Hybrid Mobile Tools at Eclipse under Eclipse Thym.

CordovaSim is now less meme-compatible

CordovaSim using Ripple had a "easter-egg" in the sense when you used a Cordova plugin that the Ripple engine did not understand would show a dialog titled "I Haz Cheeseburger?!?!". Great for those with a great love for internet memes but it was not very informative.

Now we provide a less meme heavy dialog letting the user know what plugin that is not supported and allow you to not have to see the message again.

Plug-in not supported dialog

Btw. if you use a popular and/or important plugin that is not supported open a jira or PR against CordovaSim.

Ionic framework in palette

We’ve added support for Ionic framework. Ionic is a AngularJS based framework that provides nice mobile components that works especially well with Cordova based application.

Ionic palette

Maven Central archetype catalog

One of the improvements in m2e 1.5 for Luna was that it no longer by default download the Nexus indexes for all repositories by default. It was simply too slow.

Thus that had to go but by removingt this the list of archetypes for the 'New Maven Project' was heavily reduced.

In Beta3 we’ve added the Maven Central Archetype catalog meaning you get access to ~9600 archetypes in a few seconds vs several minutes in pre m2e 1.5 days.

Maven Central Archetype Catalog

Review commit changes when pushing to OpenShift

When pushing changes to OpenShift and you have uncommitted changes we now show a variation of the standard git commit dialog allowing you to be selective about what files you want to get committed/added before your push.

Review changes before committing to OpenShift

JMX Navigator grouping of connections

With all the great additions to the JMX tooling in last beta we realized the JMX Navigator view could benefit from having its connections grouped by type.

Allows you to more easily find what you are looking for and when auto-discovered connections come and go the view stays stable.

JMX Navigator group by connection type

Fixed incremental deployment regression

…​and finally we fixed a rather severe regression in our server tools. The server adapter were triggering full redeployments if your project had certain type or module or jar dependencies.

Making your development workflow really slow compared to the more or less instant feedback you should get when just updating dynamic content like html or jsf.

Sorry for having that broken but now it is fixed - thus if you felt the server publishing was slow then please try it now! It should be back to its fast self again.

…​and more

There are more improvements covered in the more detailed: What’s New.

What is Next

This Beta is the last planned Beta for JBoss Tools 4.2 and Developer Studio 8. The next release is set to be the candidate release thus please do try this release out and give feedback to make sure you’ll have a good experience with JBoss Tools on Eclipse Luna!

Let us know what you think in the comments below!

Hope you enjoy it and remember…​

Have fun!

Max Rydahl Andersen
@maxandersen

In our recent milestone releases of JBoss Tools 4.2 we’ve started gathering additional data from those who are have agreed sending back anonymous usage data to us (Thank you!).

Reminder: As always, this is my personal interpretation of the data and again it is early days for the data collection. These numbers are just for the last month of beta testers thus do take these absolute numbers with a grain of salt!

In any case I find the numbers interesting and thought I would share since there are some lessons to be learned.

JBoss Server Usage

One of the data points are which JBoss servers users create.

Mind you we don’t collect the exact version of the server installed, just which server adapter users are using - i.e. EAP 6.1 also covers EAP 6.2 and 6.3, WildFly 8 covers 8.0 and 8.1 etc.

server creation stats

The numbers above shows the last two weeks of server creation by our beta users. Not surprisingly majority of users are using the community version of the latest JBoss servers (AS 7.1 and WildFly 8), and it’s great to see the third most used server is the free for development/enterprise supported EAP 6.1/6.2/6.3.

Oldie but goodie

What I find funny is that there are still users using the latest/greatest development tools, but who runs JBoss AS 3.2 - this was last released back in 2006! Talk about dedication :)

Importance of Multiple runtime support

What the list shows to me is the importance of development tools need to support multiple versions because even though most are using latest/greatest runtime there are still a great bunch of users that will be using older versions of runtimes. Many developers tend to forget or blissfully ignore this.

I’m convinced as users move to our release that gathers these data we will start see even higher numbers of "older" runtime usage.

Deploy Only Server

What is a bit disconcerting is how few seem to know about our Deploy only server (in this list noted as systemCopyServer ). This server allows you to use Eclipse’s support for incremental deployments to any directory locally or remotely available. Really useful for deploying to a non-JBoss server, a remote PHP or just a plain html app.

You should try it out!

File  New  Server  Basic  Deploy Only

Combine this with our LiveReload support and you get a great and fast workflow!

Uptake of Eclipse versions

Another data item we have insight to is the uptake of Eclipse versions.

Uptake of Eclipse versions

The graph above is our recorded startups of Eclipse Java EE installs since January pr. week. Be aware the versions listed are the EPP versions, not Eclipse release train versions - I’ll do the mapping for you below.

Two things to note: the "Drop" at the end is just the effect of the numbers ending middle of the month, the "Dip" in mid April I’m not sure what is but we see it across all our Google analytics thus I expect it was an Google Analytics anomoly. The numbers have since stabilized, that said…​lets interpret!

This graph shows how Eclipse Kepler SR1 release (2.0.1) usage is dropping as users upgrade to Kepler SR2 release (2.0.2) - this are most likely the effect of users using Eclipse built-in update mechanism to upgrade.

What also can be seen is that the latest stable release (4.4.0) uptake is gaining faster than total Eclipse version usage (the faint lines are even older eclipse versions). Meaning total usage of JBoss Tools is up/stable. Eclipse isn’t dead yet :)

I wish Google Analytics had a way to show this graph cumulative instead of per line…​anyone up for a data extraction and visualization project ? I’ll give you access to the data to play with.

Uptake of Eclipse Luna

Finally, my personal main interest was to see what the uptake of Eclipse Luna is.

You can see what effect a GA release of Eclipse has. The red line is Eclipse Luna going from a couple of hundreds starts to now 7.000 starts pr. week since its release - but do notice that there is no corresponding drop (yet) in Kepler. Looks like most are installing Luna next to their Kepler installs (my theory at least ;)

This mimicks previous years uptake patterns and once everyone gets back from vacation and Luna SR1 release comes out it should be close to the level of Eclipse Kepler installs. Good to see users continue to picking up latest greatest features and bugfixes!

I’ll go look at the numbers again in a few months to see if the trend continues.

If there is some additonal data you are interested or questions about the above let me know in comments and I’ll try include/answer it!

Have fun!

Max Rydahl Andersen
@maxandersen

In this article, I’m happy to introduce you the OAuth authorization via Phonegap’s inAppBrowser plugin with CordovaSim.

I was inspired to write this blog after reading a great article about Google API OAuth with PhoneGap’s InAppBrowser by Michael Dellanoce. I also want to spill the beans about new CordovaSim’s features like: JavaFx web engine, hybrid app debugging and eclipse console logging, that will be available in Beta3 (but you can try them now from the nightly build 4.2.x update site).

Overview

OAuth is an open standard for authorization. It specifies a process for resource owners to authorize third-party access to their server resources without sharing their credentials. Designed specifically to work with Hypertext Transfer Protocol (HTTP), OAuth essentially allows access tokens to be issued to third-party clients by an authorization server, with the approval of the resource owner, or end-user. PhoneGap Developers use inAppBrowser’s API to show the OAuth consent page.

Demo

CordovaSim supports inAppBrowser plugin and handles OAuth authorization. Here is a short video with OAuth demo and brand-new CordovaSim’s features (source code is also taken from the Michael Dellanoce’s article):

How to give it a go?

The sample should work with JBoss Tools 4.2.0 Beta3 release and later versions.

  • Clone the demo project

  • File → Import → Import Cordova Project

  • Right-click on the project → Properties → Hybrid Mobile Engine → Download → 3.4.0 (select as default engine)

  • Create a Google Developers Console project

  • Copy and paste Client ID and Client secret to index.js (lines 80-81) of the hybrid project

  • Right-click on the project → Run As.. → Run with CordovaSim

A few things to notice here : first, the Hybrid Mobile Tools imports the project into Eclipse and configures the proper plugins without there being any Eclipse specfic setup in the project. This works because the project is following the conventions from Cordova CLI generated projects and the import wizard understands this.

Secondly, when using Java 8, you can connect the Chrome debugger to the CordovaSimulator (Right click → Debug on browser) allowing you to step through the code, introspect variables and so forth.

Conclusion

We are trying our best to make CordovaSim as good as possible. User feedback is what we are seeking for now. We are looking forward to hearing your comments / remarks!
Have fun!

Ilya Buziuk
@ilyabuziuk

Announcement - JBoss Tools reaches end of life

by Stéphane Bouchet on Aug 01, 2025.

JBoss Tools 4.29.1.Final for Eclipse 2023-09

by Stéphane Bouchet on Jun 13, 2024.

JBoss Tools 4.29.0.Final for Eclipse 2023-09

by Stéphane Bouchet on Nov 02, 2023.

JBoss Tools 4.28.0.Final for Eclipse 2023-06

by Stéphane Bouchet on Jul 03, 2023.

JBoss Tools for Eclipse 2023-06M2

by Stéphane Bouchet on Jun 05, 2023.

Looking for older posts ? See the Archived entries.
back to top