Apache Karaf on Vagrant (example Vagrantfile)

If you have a team developing OSGi applications for Apache Karaf, Vagrant provides an easy way to ensure everyone is testing local deployments in a consistent context.  Vagrant is a little like Docker, using a layered approach to build up virtual environments.  In this case, we create an Ubuntu “box”, running on a VirtualBox VM, and automatically set it up with everything necessary for Karaf testing. Continue reading

Find Transaction Leaks in Wildfly and JCA

Here’s a quick tip: the easiest way to find transaction leaks in Wildfly/JCA.  In standalone.xml’s JCA subsystem, change

<cached-connection-manager/>
to
<cached-connection-manager debug=”true”/>

That will automatically close un-closed JCA connections and spit out a nice warning/stacktrace, showing exactly where the transaction was opened.

Apache and MariaDB/MySQL Settings for Low-Memory Servers

Gone are the days of requiring large amounts of resources to adequately run a fast, enterprise-grade web server.  I currently run a single DigitalOcean instance (the 1GB memory plan) and host many web platforms with no performance issues, whatsoever.  I thought I’d share the settings that have been working really well in this low-memory environment.  Note that the server is running CentOS 7, but these settings should be applicable for any OS.

For what it’s worth, if you’re interested in a DigitalOcean account, click here to use my referral — you’ll gain $10 in credits when you sign up… Continue reading

How to Issue Bulk Refunds through the Stripe API

Today was not a good day.  In short, a nonprofit’s online donation form was hit 1,285 times in an attempt to validate stolen credit cards.  Unfortunately, 120 of those succeeded, meaning our Stripe account had over $600 in fraudulent donations.  I needed a quick way to fully refund those charges, but in bulk.  Through the Java API client, I was able to do the following.  I figured I’d throw it out here, in case someone else can use it.  Note that although it uses the Java  client, the concept is identical for others. Continue reading

The Responsible Consultant: What project information should my software/web developer provide?

Getting right to the point, many (possibly even most) software/web developers will simply hand you the deliverable upon project completion and call it a day. The tools and processes used are often held back, forcing you to always go through them for updates or eventually argue with them to get what you need. Although the former may make a bit of business sense on the consultant’s side, I’d argue that this methodology is terrible. Continue reading