19
Officially, Glassfish is not a supported platform for JIRA, Atlassian’s extremly popular issue tracker. Since we’re migrating to Glassfish at work, it’s pretty important that we get it the two to work together. As it turns out, it’s really not that bad at all. Here’s what I had to do to get JIRA, PostgreSQL, Active Directory and Glassfish all playing nicely together.
The first step, of course, is to download the JIRA distribution (For our purpose here, I’m going to assume that Glassfish and PostgreSQL are already installed an running.) Once JIRA has been downloaded, we need to extract the archive to our work area and make our mods. In our case, the mods were pretty simple: database location, plus Active Directory integration, which means two files need to be modified.
For the database, you’ll need to modify entityengine.xml, which you will want to copy from webapp/WEB-INF/classes to edit-webapp/WEB-INF/classes. We’ll need to make two changes in this file: the transaction factory, and the data source. For the transaction factory, we need to locate the element, and edit it to look like this:
For the curious, that change is just the removal of “java:comp/” from the JNDI name. For the data source, find the element toward the end of the file. This is what ours looks like:
Of course, you need to make sure that the datasource “jdbc/Jira” is configured in Glassfish. If you need help with that, this blog entry should be helpful. For Active Directory integration, copy osuser.xml from webapp/WEB-INF/classes to edit-webapp/WEB-INF/classes. Since this file is smaller, I’ll show it in its entirety:
Once those files have been created, from the root of the JIRA work directory, issue the command “build ear”. Technically, you have a choice between WAR and EAR deployment. I chose EAR, as it saves me one step (changing the context root) at deployment. It will most likely take a few minutes for that task to complete. Once it has, log on to the Glassfish admin app, navigate to Applications->Enterprise Applications, click deploy, then click Browse to find your EAR, which will be in the directory dist-generic in your JIRA working directory. Select the ear, click OK, click Next, change the app name if you’d like, then click Finish. This process, too, will likely take a few minutes, but, once it’s done, you’re ready to point your browser at your new JIRA installation and begin configuring it.It’s that easy! ![]()
Popularity: 11% [?]

very informative. I see that you are changing the CSS
April 19th, 2006 | #
Thanks for publishing this blog. This has been featured in our GlassFish Extras page at http://wiki.java.net/bin/view/Projects/GlassFishExtras for the benefit of other JIRA users on GlassFish and will also be highlighted in The Aquarium blog (http://blogs.sun.com/roller/page/theaquarium)
Could you tell us which build of GlassFish you used for this test?
regards
Shreedhar
April 19th, 2006 | #
Shreedhar,
We are currently using the Build 43 nightly from April 4. Since things are working pretty smoothly on it right now, we’re likely to leave it on that at least until the Glassfish RCs are released, if not the GA.
April 20th, 2006 | #
Hi Jason
I agree Build 43 is pretty stable albeit with some corner case issues.
I would like to discuss with you a possibility for JavaOne. Could you send me an email at shreed at sun dot com ? I can then respond with details.
Thanks
Shreedhar
April 20th, 2006 | #
Thanks for sharing these instructions. We used them to succesfully install Jira on Sun Java System Application Server 9 FCS, talking to a PostgreSQL 7.2 database (we didn’t do LDAP authentication yet).
Anybody have an idea why the ‘java:comp/env’ prefix needed to be stripped for GlassFish? I mean, wasn’t ‘java:comp/env’ required in previous J2EE specs?
May 22nd, 2006 | #