Concurrency 1. Scala 1. Concurrency 2. Scala 2. Scala 3. Scala 4. Developing with real-time Java, Part 1: Exploit real-time Java&# Real-time Java is a set of enhancements to the Java language that provide applications with a degree of real-time performance that exceeds that of standard Java technology.
Real-time performance differs from traditional throughput performance, which is typically a measurement of the total number of instructions, tasks, or work that can be done over a fixed amount of time. Real-time performance focuses on the time an application requires to respond to external stimuli without exceeding given time constraints. In the case of hard real-time systems, such constraints must never be exceeded; soft real-time systems have a higher tolerance for violations. Real-time performance requires that the application itself gain control of the processor so that it can respond to stimuli, and that while responding to the stimuli the application's code is not blocked from execution by competing processes within the virtual machine.
Back to top Realtime threads Assigning thread type by priority Listing 1. Stories/MichaelDykman - J. Michael Dykman I am probably the last person on this list who should pipe in here.
Args4j: Java is Pass-by-Value, Dammit! Objects as Functions in Java. Earlier this year I wrote a build tool in java.
The core idea at the time was to express the build in terms of functions and function composition. This is not exactly a good fit with java. What I miss in Java. So I finally got some time to sit down and write, after being knee deep in work the past month or two.
And without a doubt, I wanted to write about what has been heckling and annoying me over the past month. I am an ardent defender of Java as a good language, especially defending it from Misko day in and day out, but even I will agree that it does suck at times. So today, Java, the gloves are off. I love you, but this is the way things are. Signalling Integer Overflows in Java. ...and people are still using java? Last week I was at the LASER 2009 summer school on Software Testing.
It was pretty interesting and one brief talk captured my attention. The speaker, Martin Nordio, asked the audience if they knew Eiffel and only a few hands were raised. So he asked if they knew Java instead. Everyone raised his hand. DEADBEEF or CAFEBABE. Two Java Type‐System Holes. Next Generation Java is not very different from today's Jav.
Next Generation Java is not very different from today's Java In a recent post, Stephan Schmidt makes several suggestions in order to write "Next Generation Java".
Unfortunately, I disagree with most of them... Let's take them in turn: final everywhere This is guaranteed to make your code littered with final keywords and therefore, impair readability significantly (same problem as Python's self pollution). Java's Lots of Little Files. I ran into this article about "Next Generation Java Programming Style", at YCombinator.
There was some interesting discussion about the overall effectiveness of these suggestions. Part of the discussion involved commenter Xixi asking if anyone had followed point #5, "Use many, many objects with many interfaces". It turns out, I've been following that model. I started to reply there, but I recognized a blog post after a bit. Here's my general workflow, and I've found it to be quite effective. The linked-to article refers to interfaces as "roles", and that's probably the easiest way to think of them.
Go Ahead: Next Generation Java Programming Style. August 10, 2009 by Stephan Schmidt Many companies and developers move away from Java to new languages: Ruby, Python, Groovy, Erlang, Scala.
You might be trapped with Java. Even if you’ve trapped, you can change your programming style and reap some of the benefits of those new languages. A Java old timer reminisces – Oak, 0XCAFEBABE, Green Threads, Ru. I have been working with Java since the mid nineties, and in that time, Java has gone from being a “fad”, the next “big thing”, etc, to becoming a widely accepted and deployed programming language in the business world.
Being involved with Java for a long time has its share of ups and downs. On the plus side, you know and understand the very basic foundations of the language and its evolution, on the negative side you sometimes talk about stuff no one else has a clue about. Double Brace Initialisation. The high cost of (WS-)Security. WS-Security provides a comprehensive set of security features for Web service applications, building on established industry standards for cryptography and XML encryption and signing. You can specify the features to be used for a particular application with WS-Policy and WS-SecurityPolicy, allowing clients of the service to configure themselves automatically to access the service. With widespread support for these standards across multiple platforms and web services frameworks, interoperability is good (and getting better over time). Despite these benefits, WS-Security also has some drawbacks. You've seen in the last two articles of this series that WS-Security can be complex to configure, and that it sometimes adds a lot of bulk to the messages being exchanged.
So when are the benefits of WS-Security worth the costs? #534364. Keynote: The Future of Java Innovation. Bio Rod is one of the world's leading authorities on Java and J2EE development. He is a best-selling author, experienced consultant, and open source developer, as well as a popular conference speaker. Rod is the founder of the Spring Framework, which began from code published with Expert One-on-One J2EE Design and Development. Along with Juergen Hoeller, he continues to lead the development of Spring. SpringOne is the annual conference for the global Spring community held in both Europe and the Americas. Ternary Try/Catch. We often discuss Java limitations on IRC and try to come up with (sometimes silly) workarounds. Unfortunately after time passes it’s often easy to forget the outcome, and lose code snippets. So I thought I’d start blogging some of them so I don’t lose them, and other people might suggest other ways of doing things that we’ve overlooked. This particular problem occurs when you want to assign the result of a method that can throw an exception to a final variable.
For example: This will fail to compile with “variable c might already have been assigned”. Common Java Cookbook. Copyright © 2004-2012 Tim O'Brien. All Rights Reserved. This collection provides expert tips for using Java-based utilities from projects such as Apache Commons, Apache Lucene, and Apache Velocity. You don't have to be an expert, the book's solution-based format contains code examples for a wide variety of web, XML, network, testing, and application projects.
If you want to learn how to combine common open-source Java utilities to create powerful Java applications and tools, the is for you. Original Sin. Is Java as we know it doomed? While Oracle and Sun Microsystems are hailing Oracle's purchase of Sun as a big boost for Java, others are not so sure, questioning what kind of control Oracle might try to exercise over the popular platform that has driven so many enterprise applications since it was first developed in 1995. Mulling over Java. Transaction strategies: The API Layer strategy. Whether you are using a container environment with EJB 2.1 or 3.0, the Spring Framework environment, or a Web container environment such as Tomcat or Jetty with the Java Open Transaction Manager (JOTM), you still need a transaction strategy to ensure database consistency and integrity. The Java Transaction API (JTA) specifies the syntax and interfaces associated with transaction processing (see Resources), but it doesn't describe how to put these building blocks together.
Just as a construction crew needs a blueprint to build a house out of a pile of lumber, you need a strategy that describes how the transactional building blocks are put together. Why Java doesn't need operator overloading (and very few la. MVEL - Home. Small Language Changes for JDK7. Putting Java’s Null in its Place. Presenting the Permanent Generation. Have you ever wondered how the permanent generation fits into our generational system?
Ever been curious about what's in the permanent generation. Busting java.lang.String.intern() Myths. (Or: String.intern() is dangerous unless you know what you're doing!) Update: The subject discussed in this article was true up to Java 6. In Java 7, interned strings are no longer allocated in the permanent generation, but in the main Java Heap. I've decided to leave this article here for historical purposes, but keep in mind that the allocation of interned strings in the main heap makes the intern() method an appealing feature to prevent string explosion in the heap. The two reasons above are closer to myth than reality. Correcting the Billion Dollar Mistake. Last week I visited Stockholm to speak at the JFokus 2009 . The event was quite spectacular, but for me the most interesting part occurred on the evening before the conference.
Ten Amazing Java Applications. How to deal with filesystem softlinks/symbolic links in Java. Ok, here is the problem: You are assigned to write a method for a Java based filemanager, that is able to delete an entire directory tree. Sounds like a trivial task, that can easily be solved by a very simple, recursive algorithm, doesn't it? Take a File object. If it is indeed a file, just delete it. How much memory is used by my Java object? Jedi - Examples. Java : the perpetually undead language. Data Rattle.
Heterogeneous Lists and the Limits of the Java Type System. The case for Java modularity - Java World. Top 3 Reasons Why Constructors are Worthless. Build an Embedded Array Language in Java. Java Is Too Academic. The Long Strange Trip to Java. Java in 2008.