Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Friday, 7 December 2012

Brand Scope - C3P0 with multiple schema - Part I

During the week we were working on a task to make our product multibranded. It means that each brand has its own database schema but the logic is the same. In the following article I will show how we built a brand Spring scope and how it was applied on the C3P0 to return the proper connection to each request.

Everything what is written here is created by my colleague Yazid Bouhass and myself for Masabi Ltd..

In the first article I show how the brand scope was built, and the second article will contain the C3P0 configuration.

Brand scope - C3P0 with multiple schema - Part II

During the week we were working on a task to make our product multi branded. It means that each brand has its own database schema but the logic is the same. In the following article I will show how we built a brand Spring scope and how it was applied on the C3P0 to return the proper connection to each request.

Everything what is written here is created by my colleague Yazid Bouhass and myself for Masabi Ltd..

This is the second part of the post. In the first part I showed how the brand scope was built. In this article I will present the C3P0 solution.

Saturday, 1 December 2012

Weekly bean - 30/11/2012

On Friday - as usual - the regular Moresby Coffee Weekly Bean took place at Canary Wharf. Where we were talking about the IT world, news, experience, technologies.

Weekly gadget

Weekly topic

LJC Open Conference

About this event you can read under our LJC Open Conference post.

NoSQL database

We were talking about the purpose of the NoSQL databases and the hype around them. Balazs told me, how Cassandar is being used at Hailo.

Home Media Center

Balazs had installed XMBC on an old laptop and showed how cool is that.

Next bean

The next Weekly bean will take place on 30th of November at 7am near Canary Wharf.

Topics for the next week:
  • Habits of developers
  • Neo4J demo

Sunday, 25 November 2012

Wednesday, 13 June 2012

How to test Spring MVC with Jetty and custom database - Part II

This is the second part of a series of articles in which I'm writing about how we test our Spring MVC RESTful web services. I'm going to show in a couple of tests how a good test environment can be configured with database and custom database generation.

  • Part I is about the configuration
  • Part II is about the database configuration
  • Part III is about the custom database generation (comming soon)
  • Part IV is about the csv based database generation (comming soon)

Tuesday, 5 June 2012

MByHave 1.0 Alpha

MByHave is a BDD (Behaviour Driven Development) tool for Java. Very similar to JBehave but it is more simple and easy to integrate to JUnit.
MByHave is delivered with a JUnit runner (plugin) which can parse story files and match them to the annotated test file methods.

Pros and cons

Pros

  • Very simple
    • Easy-to-use
    • Easy to configure
  • JUnit plugin

Cons

  • No reporting subsystem
  • Just a JUnit plugin

Download

Monday, 4 June 2012

How to test Spring MVC with Jetty and custom database - Part I

In the following articles I'm going to write about how we test our Spring MVC RESTful web services. I'm going to show in a couple of tests how a good test environment can be configured with database and custom database generation.

Saturday, 28 April 2012

Weekly coffee - 4th bean

After two weeks lack of Weekly bean we are here again. Friday morning we kept out weekly meeting in a (surprise!) Starbucks at Canary Wharf. As usual we were talking about Java, Scala and IT interestings.

Weekly news/gadgets

Cloud storage

Lamda expression in Java

State of the Lambda

Weekly api

Weekly topic:

Scala persistence

I have been examining the persistence solutions in Scala to use one of them in our project

I found there are 4 ways:

  • SQL
  • Hibernate/JPA
  • Type-safe SQL
  • Scala syntax db access

The post about the Scala persistence is coming so please be patient.

Links

TDD - Acceptence TDD - BDD

We were talking about TDD comparing TDD in ... and in practice. How we are doing and how we could be doing better. Pros and cons, etc.

The rule of Acceptance TDD in a project life and where the BDD is useful

Links

Weekly weakness WTF

This week was a happy special week, because we didn't complain about anything. We just renamed the topic to WTF having been inspired by the Google.

Next meeting

4th May 2012, 6:30 AM, Starbucks at Canary Wharf

Friday, 13 April 2012

Coffee Moth - Hibernate L2 cache and Subclasses

Yesterday I was investigateing a very strange behavior in Hibernate. Yesterday morning I added EhCache as a second level cache to the hibernate and I made some tests to be sure everything is alright. I was very surprised when I saw that my entities are not cached so I started investigating the bug.

Firstly I tried different setups but nothing changed. Because I used this configuration many times without Spring, I suspected it can cause the bug. In the next step I tried get rid of all the Spring related stuff, e.g. removed the spring transaction management. I used the Hibernate as pure as it was possible and the cache was still not working.

Today morning (after I fixed an other bug) I leaned again to the problem, having downloaded the hibernate and ehcache source code I was debugging the code. It did't take a long time to find the reason. The second level cache is NOT enabled for my entities because those are extended classes, inherited some properties from our GenericEntity class.

Thursday, 5 April 2012

Weekly coffee - Third bean

Today morning, being the last workday of the week, we met again in a Nero at Westminster Starbucks at Embankment to talk about interesting things of the Java and IT world.

Weekly gadget

  • Photo warp - to create funny pictures
  • London Live Bus Tracker - the best bus application for Android so far. Not as good as the one I used on iPhone but the main functionality is in place, so it's a good start. Horrible UI. :)
  • Goodreads (Android) - to share your readings and your opinion about them. What I love about it the most is the social aspects of the app - you can update and share your reading status (eg. on which page you are). It's not only very useful for your FB Timeline but also an instant conversation generator. :)

 

 Weekly chat

Weekly topic

  • Spring AOP
  • Spring MVC
    • Spring MVC vs. Servlet/JSP (pros and cons)
    • Spring MVS vs. Guice + Servlet/JSP (pros and cons) I'll try to write an article about this on the next week.
  • Scrum basics
    • Scrum in practice
    • Backlog/Task board/Story card in the real world

Project

We made some decision and agreed our first coding session will be kept on the long eastern weekend. Now I'm publishing only a few keywords and you will be able to read about the details in the Code Steam posts.

Weekly weakness

The information provided by TFL is **** not too useful. Today morning both information sources, the electronic board on the station and TFL api gave me wrong information about the tube status and the two sources showed completely different destinations and arriving times. :(

Next meeting

13th April 2012
Agenda

Friday, 30 March 2012

Weakly coffee - Second bean

Today morning we met in a Starbucks in Chelsea to talk about java. In this second bean we discovered the taste of Spring framework, agreed in the frame of our portfolio and in a couple of other things.

Weekly gadget:

We used Glympse because we met in an unknown Starbucks, so I shared my position and Balázs easily found me.

Weekly topic:

Spring presentation: Dependency Injection, AOP
This week I show the capabilities of Spring DI and AOP to Balázs, and we talked about the essence of Dependency Injection. There was not enough time to talk about Spring templates, so we will do it on next week.
  • Next week: Spring AOP and templates
  • After next week: Scrum

Meetups:

Flashcard project:

Portfolio

The frame is mostly done. We have to collect and build the assets.

Next meeting:

Thursday, 5th April 2012

Weekly weakness

  • I'm not able to copy this text from Polaris Office to Blogger.com post editor on my ASUS Transformer tablet.
  • I can't open Meetup.com email on my android devices (tablet and phone) because the official gmail application get frozen.

Saturday, 24 March 2012

Welcome

Today morning we (Balázs and I) met in a Cafe and talked about Java, Scala, Android and other developing subjects. We decided to have a meeting every week and create this blog to note every interesting thing what we meet in our work to. We also decided to create a project where we can try all the new interesting technologies and we will write about all of our experiences in an other blog will be started soon.

Here is a list of the technologies/APIs/software or anything what we were talking about as a reminder: