Unified Information Access Blog

Welcome to Attivio's Unified Information Access Blog. Join us for discussions on topics ranging from enterprise search solutions, information access insights, Agile software development methodology to programming with Java. We hope you'll find the articles informative and participate in the discussions by leaving a comment.

With the release of AIE 2.1, we are moving to a Spring Framework-based configuration and away from a proprietary configuration syntax and parsing mechanism. Moving to a standards-based approach is almost always a good thing. However, we did come across a few challenges that we needed to solve. The most serious one was the notion of overriding or replacing the definition of a component or bean.

A number of Spring users had the same issue a while back and a couple enhancement requests were filed as a result:

Out of those requests came a new feature to control this behavior. By default Spring will operate in one of two modes based on the values of the bean factory's allowBeanDefinitionOverriding.

Attivio uses Jetty and Apache CXF to provide Web Services. We use javax XML bind annotations on our Java objects for automatic generation of WSDL types and serialization of our objects. Overall this configuration has worked very well for us. But recently we encountered a few problems when using interfaces for the first time, implemented in multiple modules. Initially we got the exceptions IllegalAnnotationsException and MarshalException, while attempting this, but finally found the right combination of annotations to solve our problem.

Even though all the pieces to this puzzle can already be found on the web, this article provides a summary and attached example of everything working together in a single JUnit test.


As mentioned in other Attivio blogs, we use many tools in our agile development environment, including Ant and JUnit. We have over 4000 JUnit tests and rely on them to keep our code robust and allow us to quickly deploy quality releases. One obstacle we hit when running our continuous and nightly tests was in determining how to deal with test timeouts and long running tests. Currently JUnit supports setting timeouts on a per-test basis with the @Test(timeout=n) annotation. In addition, the JUnit Ant Task has a parameter, timeout=n, which allows for test timeouts managed outside of JUnit.

Both of these timeout solutions have a serious flaw in that neither gives enough information to help debug what went wrong or was going on when the timeout occurred. After getting occasional timeouts on different tests with no way of understanding why, we decided to enhance JUnit with two new features. We added a capability to set a default timeout for all JUnit tests, and a capability to capture the stack trace of all threads active at the time of the timeout.

Luckily, JUnit 4.5 has the ability to easily override some of its core functionality allowing us to improve the timeout behavior.

More Articles...

Page 1 of 3

Start
Prev
1

SUBSCRIBE

blue-rss-icon.png

Enter your email address:

 

Connect with Attivio

ico_attivio_spiral.jpg facebook-Icon.png twitter-icon.png

Contact Us:
+1.857.226.5040

Recent Posts

UIA: Boosting Customer Loyalty (Or How NOT to Annoy Your Customers)

I am in Tel Aviv enjoying a beautiful summer afternoon with a new customer when my mood is altered by a credit card snafu. Back in the states, a wary...
Read More...

Clash of the Titans: Price and Performance for Data Warehousing and Analytics

Why are all the mega technology vendors suddenly so focused on next generation data warehousing and analytics? Primarily, it's because Oracle wants to...
Read More...

Enriching Unified Information Stores with Text Analytics

Too often getting access to all the relevant business information we need has forced us to undertake a journey across multiple sources, using different...
Read More...
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8