Groovy is an object oriented dynamic language for the JVM. Dynamically compiled to a bytecode and interoperable with most Java libraries, Groovy is a perfect candidate for writing lightweight scripts that still can benefit from the Java ecosystem. Also, it is really easy to learn since the good old Java syntax is usually valid in Groovy. There are, however, a few caveats that you should be aware of before start coding. This post shows some specific features, and also gives a few suggestions which will help to write a clear, groovy-style code.
Concurrent programs is not a novelty today, almost every modern application executes in multiple threads. But as concurrency brought us better resource utilization and throughput, it also introduced a number of issues nonexistent in serial execution. One of them is deadlocks. A deadlock is a situation where in two or more competing actions are each waiting for the other to finish, and thus neither ever does.
An immutable object is one whose state cannot be changed after construction. All the beauty in these objects is that they are simple and safe. In multi-threaded applications all concurrency issues boil down to coordinating access to mutable state. The less mutable state, the easier it is to ensure thread safety. That’s why you should always consider making your objects immutable whenever it is feasible. Creating an immutable type is not a complex process, but you should follow a handful of rules to stay away from pitfalls it definitely implies.
Java locks often supersede synchronized blocks and methods by allowing to back out from the synchronization attempt. This post shows how to use the feature, and demonstrates some other basic concepts, like the lock fairness and reentrant locks, which should help you to get started with the lock-based synchronization.
In the previous post I’ve told how to bill a customer with a minimal fuss. But oftentimes returning customers wish to add or change their billing information or maybe you want to delete the old ones. Let’s dive deeper and see what’s possible to do with Authorize.Net Customer Information Manager by remote procedure calls using, as previously, Java SDK.
Short Message Peer to Peer (SMPP) is an open, telecommunications industry protocol for exchanging text messages (SMS) between short message service centers (SMSC) and External Short Messaging Entities (ESMEs). The protocol is often used for connecting to SMS centers in order to send messages to mobile devices.
JIRA is a popular issue tracking and project management software. It can be used and accessed by lots of different means like IDE, email client or a web browser. Also there are many plug-ins for all sorts of other software products. Such an abundance is explained by the fact that JIRA has open and convenient remote procedure call APIs: REST, XML-RPC and SOAP.
So, it is possible to make your application communicate with JIRA through these APIs, too. If correctly integrate a Java API client, issuing a command to JIRA becomes the same as invoking a local subroutine. Let’s create such a little Java program and do some manipulations with an Issue in JIRA.
Today we’ll talk about writing java client for exchanging data with web service using SOAP protocol specification. Many of the web services that supports SOAP have java libraries that can make this task pretty simple to implement.
But if there is no such feature, then it becomes a little tricky, but in this article I will show you that it's not so hard as it seems.