users@glassfish.java.net

Re: Berkeley DB and Glassfish

From: Bill <saxton_at_gmail.com>
Date: Fri, 18 Jan 2008 13:22:35 -0500

Frankly, I don't even want to bother using BDB!

I currently have an EJB right now that communicates with flat files...

::a deafening silence takes over the mailing list::

...yes, an EJB using java.io. It seems to work fine until I crank it
up to 1,000+ clients after which glassfish spews lots of error
messages. I'm having the dev team take a look at it now but, in case
it turns out to be a java.io issue, I'm looking into using a DB
alternative.

I really don't need anything fancy...just a way for my clients to send
data to a central server so that that server can save the data
somewhere. The files are RRD files created by RRD4J and the only 2
methods of data storage supported are in a BDB or in flat files. That
is why I was looking into the BDB solution.

On Jan 18, 2008 1:20 PM, <glassfish_at_javadesktop.org> wrote:
> This would be new ground I think.
>
> The primary problem (from an overall JEE point of view) is that JEE is dominantly used with relational databases, specifically through JDBC. And JDBC doesn't work at all with BDB (it's not a relational DB, or, more specifically, it doesn't support SQL).
>
> So, right off the bat, the JPA and EJB entities are right out (actually, to be fair, you could probably use classic EJB entity beans, but they couldn't be Container Managed Persistence).
>
> The real integration point that you want (at least, that I would want), is to get the BDB integrated with the underlying JEE transaction mechanism. This is assuming that you're using BDB transactions. If you're not, then it simply becomes a utility library that you call when you like.
>
> Are you embedding BDB or talking to a BDB server? If the former, then it's even more straightforward (I think, I have no direct BDB experience) to integrate it at the jar level. If the latter, and you want to have some kind of data connection pooling, you will most likely have to create your own connection pool and a resource wrapper to inject that pool in to the JNDI of the server. (There are several connection pool frameworks available on the web you could leverage.)
>
> JEE has mechanisms to allow you to get the integration you want. In theory all of the components within JEE are integrated through these mechanisms, and they're exposed for your use.
>
> But it's not a common use case. Hopefully someone from the team will have a better idea on how you might be able to integrate BDB to be a better first class citizen within an EJB container.
>
> It would help to tell us what kind of integration you were looking for.
> [Message sent by forum member 'whartung' (whartung)]
>
> http://forums.java.net/jive/thread.jspa?messageID=254741
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>