Web app with h2 console to access your database via browser

Here’s a simple war file that deploys H2 database web console along with h2, postgresql and mysql drivers on your web container.

You can access it by simply going to /h2console url and manage your database remotely only with your browser.

No dependencies and no manual steps required, simply deploy and connect to your database.

It’s based on configuration from JBoss quickstart, I’ve only added h2 and other db jars, so it’s ready to be used in any web app container.

Here’s a download link: h2console.war

Advertisements

Web Services in Ruby, Python and Java

Today I’ve had to prepare some examples to show that web services are interoperable. So I’ve created a simple web service in Java using Metro and launched it on Tomcat. Then tried to consume them using Python and Ruby. Here’s how it all finished…
Continue reading…

InfoShare 2011 conference

Been on technical track of InfoShare conference last Friday. Mostly to attend Adam Bien presentation and workshop. All the conference talks were great, but what I need to say is that Adam presentations are something you can’t miss. 100% Java and no marketing bullshit as someone said :). It was just that. No slides, no off topic, just code. You could ask whatever you were interested in regarding J2EE and Adam was ready to answer. Not on next Friday, but here and now. He’s a real pro and if you have an opportunity to meet him on some workshop, then you really have to go. I was driving for 5 hours for this conference and it was worth it.
Continue reading…

J2EE JDBC based authentication with JPA Entities in Glassfish

One of the authentication options you get in Glassfish is to store your users/roles just in database tables. This way you can implement your custom UIs and logic for managing users. Usual solution you’ll find over the web for that is to create them by hand with SQL and fill using JDBC. What I needed was to get some entities for the users so I just could start my app and everything is created by JPA. This is not that easy, as Glassfish has some assuptions about tables you use (as it’s also using plain JDBC to retrieve users from database). Here’s how I’ve managed to do it using JPA 2.0 entities:
Continue reading…

%d bloggers like this: