Thursday, September 10, 2009

New Screencast Online - JBoss Operations Network setup

We've just uploaded a screencast by Aaron Mulder on the JBoss Operations Network (or JON) to our website. JON monitors application servers and machines, and can control JBoss servers.

You may view the screencast by clicking the link below:

Click to Play Screencast (new window)

Saturday, September 5, 2009

iPhone and SSL

One of the problems I ran into while working on our iPhone app (see past post) is handling SSL connections. It works just fine with proper certificates, but we have several machines with self-signed SSL certificates. The normal NSURLConnection in the iPhone SDK just rejects connections to a server with a self-signed certificate, and there isn't an obvious API to get around that.

A few searches turned up a way to override part of NSURLRequest or something like that, but it really seemed to be a hack -- plus it seemed to be all-or-nothing, instead of having an easy way to hook into the particulars of each request.

Long story short, I found a better way to handle this, which may be new in the 3.0 SDK. Put this in your NSURLConnection delegate (for asynchronous requests):

- (BOOL)connection:(NSURLConnection *)connection
canAuthenticateAgainstProtectionSpace:(NSURLProtectionSpace *) space {
if([[space authenticationMethod] 
isEqualToString:NSURLAuthenticationMethodServerTrust]) {
// Note: this is presently only called once per server (or URL?) until
//       you restart the app
if(shouldAllowSelfSignedCert) {
return YES; // Self-signed cert will be accepted
} else {
return NO;  // Self-signed cert will be rejected
}
// Note: it doesn't seem to matter what you return for a proper SSL cert
//       only self-signed certs
}
// If no other authentication is required, return NO for everything else
// Otherwise maybe YES for NSURLAuthenticationMethodDefault and etc.
return NO;
}



Because the delegate typically has more information about the connection, it can make a more intelligent decision in that method. For instance, our app has a config screen where you enter a server URL, username and password if needed, and a checkbox for whether to allow self-signed SSL certificates. So our code above looks up the value of that config setting for the server when the method is called with NSURLAuthenticationMethodServerTrust.

As the comment indicates, the method is only called with NSURLAuthenticationMethodServerTrust once for any given server configuration and the result apparently cached (even across brand new NSURLConnection instances). I'd be interested if there was some way to force it to reset all that and call the method again with NSURLAuthenticationMethodServerTrust.

In a future post, we'll look at how to support HTTPS client cert authentication, which also seems to have better options in the 3.0 SDK.

Friday, September 4, 2009

Dan Allen Interview at JBoss Word - Seam update

JBoss World is winding down. It has been a good few days in Chicago. We have had the chance to catch up with some old friends and meet some new ones.

Our next sit down is with Dan Allen, a good friend of Chariot's and a JBoss developer who wrote Seam In Action.



Also, check out longer interviews with Dan at Chariot TechCast:

Dan Allen on Seam, Part 1 - http://techcast.chariotsolutions.com/index.php?post_id=443923
Dan Allen on Seam, Part 2 -http://techcast.chariotsolutions.com/index.php?post_id=444317

Dan - we are very happy you found your Oakleys.

Thursday, September 3, 2009

Interview with Manik Surtani, Infinispan

Here is the next interview we conducted at JBoss World which featured Manik Surtani of Infinispan. If you watched the interview with Emmanuel, you heard that Manik's talk was one he was highly anticipating. Manik is the lead at Infinispan and also for JBoss Cache



Here are the links Manik mentions in this video:

http://www.infinispan.org
http://blog.infinispan.org

http://twitter.com/infinispan


He also asked us to include this one:
http://infinispan.blogspot.com/2009/08/podcast-on-infinispan.html

Thanks to Manik for his time.

Video Interview: Emmanuel Bernard at JBoss World

As promised, here is the first of our interviews at JBoss World. Emmanuel Bernard was our first guest. The content is great, but our camera skills need some improving!


Emmanuel Bernard, author Hibernate Search in Action


Emmanuel's blog is http://in.relation.to/Bloggers/Emmanuel if you need more information about Hibernate.  Also, we have recorded a Chariot TechCast, episode #25, if you want to hear more about Hibernate Search and JSR-303.  Click here for the podcast episode page.

Check back later as we post our interviews with Manik Surtani and Dan Allen.

Wednesday, September 2, 2009

Chariot iPhone Application to Monitor Java App Servers

We at Chariot have been working on an iPhone application to monitor Java EE application servers. Dubbed "ServerMonitor," the application can connect to an application server and monitor various aspects of the system.
The application uses RESTful web services to communicate with a monitoring web application. This web application communicates with the JMX Server on the application server and relays the information to the iPhone client.

Features
Although this is an alpha version of the application, and we are soliciting feedback, we have implemented several key features. First, the application servers can be monitored for various statistics, such as JVM Heap usage or number of open connections. Warnings (shown in yellow) and errors (shown in red) are displayed as the servers are polled for appropriate statistics.

Server information is pulled from the running instance, and the server status indicator changes color and errors are displayed. Servers can be polled based on a configuration setting, which can be changed to lower or higher time delays.
Project Status

Currently the Server Monitor project is being readied for alpha testing, and we are looking for interested customers to help us implement features and functionality to make the tool as feature rich as possible. For more information, or to participate in shaping the product, please contact Tracey Welson-Rossman.


First evening at JBoss World

We had a very nice start to our time at JBoss World last night.  There was an opening party from 6-9 in the Partner Pavilion where the attendees mingled with the exhibitors. 

We were able to interview Emanuel Bernard and Manik Surtani.  I hope to upload those later today.  If not, they will be up on the blog early next week.  We also were able to catch up with Greg Hinkle, lead of the JON team at JBoss.  Greg was a Chariot "eer" a few years back and we are always happy to see him at these events.

Check back later for an announcement from us on an application our team has created.