JNDI lookup on JBoss
There is no standard way as per Java EE specs for JNDI naming conventions, hence most of the application servers have their own way of JNDI naming.
On specifying a Datasource’s JNDI name as ‘myDatasource’, JBoss binds as ‘java:myDatasource’. So if one want to deploy the application on Jboss application servers then can use the simplest way is here. The steps for adding and using jndi Datasource to JBOSS 4.x is as under-
- Copy the jdbc driver to JBOSS_HOME/server/default/lib.
- Create the jndi xml file for datasource – example ds.xml Read more…
Debug Maven tests running inside eclipse
For those of us who have been running JUnit tests inside eclipse , one of the biggest feature available to us was the debug ability of the JUnit tests.
When we started working on Maven tests , the first questions which came to mind was , How am I going to debug it ?
I started with running the tests class by selecting the class in eclipse and right –> Run as Junit Test.
But this does not work. There are some variables which are being injected through pom.xml and tons of other dependency bugs which would be thrown.
So here is how to run your units tests in debug mode while running through mvn command. There are two steps to this. You will have to first set up a remote launcher, similar to the way you might have done for remote server.
Then you will run the tests from command prompt or
Create Remote Java Application Debug Configurations Read more…
Fatal error: wp-includes/vars.php on line 16
If you are upgrading to wordpress 2.9, you might get this error Fatal error: wp-includes/vars.php .
Some people get this error when they do an automatic upgrade. I got this error when doing upgrade manually.
Reason : Some of the files were not copied correctly. You would keep your wp-config.php and contents folder. Rest all the files and folders need to be replaced.
Free Schedule D generator with Wash Sale Calculation
If your broker provides a .txf file for your stock transactions and you do not want to spend big bucks on turbo tax, use the simple Schedule D generator excel sheet below.
Steps to generate wash sale and schedule D Read more…
One-to-One mapping in Hibernate using Foreign Key Association
One-to-One mapping can be done in 2 ways:
- Primary key association:
- Foreign key association.
My previous post described about the Primary key one-to-one mapping in Hibernate. This post gives an example of Foreign key one-to-one association in Hibernate. Read more…
Mapping Composite Keys in Hibernate
In Real world applications it is natural to have tables with composite keys. The row will be identified with combination of key column values of a row.
Consider Following scenario:
A test selling website defines tests and customers.
One-to-One mapping in Hibernate
In Hibernate One-to-One mapping can be done in 2 ways:
- Primary key association:
- Foreign key association.
This article describes how a Primary key One-to-one association can be done.
Consider a Customer and address entities. Each customer will have one address. And an address is associated with one customer. To make this relationship work in database customer and address will have same Id(primary key). Mapping this kind of relationship in Hibernate is called primary key One-to-One association. Doing so will help you saving, updating, deleting related entities easy.
The Object Oriented Game Approach Part 2: Getting started with iPhone Game development
In the past articles, I’ve discussed OOP(Object Oriented Programming) and Game Programming.Be sure to at have a grasp of the basics before diving to this next article.
The basic prerequisites to develop your first iPhone GameApp are:
1)Objective C
2)the iPhone SDK
3)MAC:XCode
So to develop a game in the iPhone , these prerequisites will force you to work in a MAC, and learn Objective C on top of learning the iPhone SDK. Do not be alarmed. Take one step at a time.If you know OOP already, then you just have to familiarize.
Spring Certification in India
Spring framework is very popular and need of spring knowledge among the IT industry is raising. But I found that getting a spring certification is not very easy. To get the spring certification voucher you have to take spring training from spring source, which are available in few major cities of India or you have to have a prior work experience in spring.
You can find spring training locations here…
Getting started with Spring TC server
As promised in last post Good bye MyEclipse. Welcome STS -Spring source Tool Suite, I would be going into the details of Spring TC server development edition and its integration with Spring Source tool suite (STS).
Spring launched the Spring source tc server which is a layer of functional ties and capabilities over the famous Apache Tomcat server. From Spring source site
SpringSource tc Server™ is an enterprise version of Apache Tomcat that provides developers with the lightweight server they want paired with the operational management, advanced diagnostics, and mission-critical support capabilities businesses need.
More details on Spring TC server can be found SpringSource tc Server — The Tomcat You Know
I decide to give the Spring TC server a shot. I downloaded tc Server Developer Edition(Free) edition (you will have to fill in details and then you get a link in email)
Spring adds JSON support
We had posted a tutorial example on JSON Java script sometimes back. It became a pretty popular post and people gave good feedback about it. Some how the post got deleted and with it all the user’s comment. We apologize to our users. Here is the post JSON JavaScript Tutorial. JSON is really cool and gives a lot of power in hands of developer.
Spring 3.0 which has come up with a lot of simplification like asynchronous method invocation , have also simplified AJAX calls. You can now now invoke server side code with JSON and Spring 3 provide support for that. Details on it can be read from Spring Source blog AJAX Simplification in Spring 3
PS: Last time I checked out the spring blog, the above url was pointing to wrong post. They might have fixed it by now
The Object Oriented Game Approach Part 1: Objects
(For the next series of articles, I would assume that programming would be a fundamental part of one’s body, if not, then go practice! Also ,you need to brush up on some Object Oriented concept. Happy Reading)
Today, we would be tackling about Object Oriented Paradigm, in relation with Game Programming. For now, think inside the box.
First picture a room, say for example picture a computer room.
What should be inside this kind of room? More or less we can see a number of CPU’s, keyboards,mouses,monitors,cables and maybe one or two printers.Is the room airconditioned? Then you can probably feel a little cold inside this room. Hear some music or probably some noise? Is a sound system probably present too?Also, you should not forget about the tables and the seats where the computers are, or the AVR’s where the computers are hooked too! Have you gotten a feel of the room yet?
Planning is almost always done first instead of just rushing in and just coding whatever pops out of the mind. Coding without planning is only done for those things that need to be crammed. Game programming shouldn’t be one of them.
Now proceed to the next step. Ask yourself these questions:
a)Where are you again?
b)How many objects are in the room?
c)Why are these objects here in the first place?
d)What is the purpose of a specific object?
e)How does an object work?
f)What are the functions of these objects? Read more…

