The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

btgreene1010 (4) [Avatar] Offline
#1
Any plans to add an excerpt on how to use a database other than Apache Derby? I've been looking around the web for a good example of how to get OSGi web apps running with MySQL with no luck.
holly.cummins (16) [Avatar] Offline
#2
Re: MySQL or others?
Hi Brendan,

Good question. In principle it should just be a question of wrapping the jar containing the JDBC driver as an OSGi bundle and then using the same trick we use in chapter 3 to register a datasource as an OSGi+JNDI service. Many of the higher-level servers will also have built-in function for creating MySQL datasources, which you can look up in JNDI (assuming you're using JPA).

We don't have a lot of room to discuss different databases, but we should probably mention the subject. I'll see if we can get something extra in the sample code zip which uses a different database, too.