You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@struts.apache.org by Larry Babb <lb...@charter.net> on 2004/09/14 05:56:53 UTC

Struts Database Message Resources via OJBMessageResources

I found a reference to a sourceforge project that James Mitchell developed called OJBMessageResources and I am curious to the status.
�
It was last updated in April 2003.� I found a reference on a mailing list that it was/is going to be integrated into the Commons Resources and that the Commons Resources was being planned for integration into Struts (1.3 I think).
�
My questions are:
�
1. Does anyone know the current status of this project?
2. Or an alternative for centralizing message resources across web apps in a single repository?
3. The OJBMessageResources project is based on the older jakarta-ojb v 0.9.4 which is now under DB Commons in Apache.� Is this planned for inclusion into struts and if so is there a more recent version?
�
Any help would be appreciated.
Thanks
Larry Babb

Re: Struts Database Message Resources via OJBMessageResources

Posted by Mike Kienenberger <mk...@alaska.net>.
It's also very easy to create your own custom DatabaseMessageResource class 
following the methodology that James used.
Just create a trivial "DatabaseMessageResourcesFactory extends 
PropertyMessageResourcesFactory" to point to your DatabaseMessageResource 
class, then in your "DatabaseMessageResources extends 
PropertyMessageResources" class, override "public String getMessage(Locale 
locale, String key)" to read from your database (or in my case, first try to 
read from the database, then fall back to the flat file).

Of course, it wouldn't have been so simple if James hadn't provided a good 
example to work from.

-Mike


> ----- Original Message -----
> From: "Larry Babb" <lb...@charter.net>
> To: <de...@struts.apache.org>
> Cc: "Larry Babb" <lb...@charter.net>
> Sent: Monday, September 13, 2004 11:56 PM
> Subject: Struts Database Message Resources via OJBMessageResources
> 
> 
> I found a reference to a sourceforge project that James Mitchell developed
> called OJBMessageResources and I am curious to the status.
> 
> It was last updated in April 2003. I found a reference on a mailing list
> that it was/is going to be integrated into the Commons Resources and that
> the Commons Resources was being planned for integration into Struts (1.3 I
> think).
> 
> My questions are:
> 
> 1. Does anyone know the current status of this project?
> 2. Or an alternative for centralizing message resources across web apps in 
a
> single repository?
> 3. The OJBMessageResources project is based on the older jakarta-ojb v 
0.9.4
> which is now under DB Commons in Apache. Is this planned for inclusion 
into
> struts and if so is there a more recent version?


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org


Re: Struts Database Message Resources via OJBMessageResources

Posted by James Mitchell <jm...@apache.org>.
> 1. Does anyone know the current status of this project?

Yes, it is there for your use.  It is a bit of a hack considering the
underlying api.  But it still works just the same.


> 2. Or an alternative for centralizing message resources across web
> apps in a single repository?

I have not heard of anyone else who has developed an open source
database-based resource bundle.


> 3. The OJBMessageResources project is based on the older jakarta-ojb
> v 0.9.4 which is now under DB Commons in Apache. Is this planned for
> inclusion into struts and if so is there a more recent version?

Commons resources is still in the commons sandbox under Jakarta.  You are
welcome to check it out and build it with Maven.  The code is relatively
complete and the full test suite passes.  Just last week I finished moving
the database implementations (iBatis, straight JDBC) around.  I had
originally added a Hibernate impl as well, but as I understand it, the
license is incompatible with Apache's license, so I moved that code over to
sf.net (http://sourceforge.net/projects/struts).

You will need to get the source from cvs.  I just haven't released it yet
(it's on my todo list).  You'll need to use both the
commons-resources-1.0-dev.jar and commons-resources-tests-1.0-dev.jar that
are generated by building commons-resources with Maven.

Be conscious of the fact that the commons-resources API could change rather
drastically before it becomes an official release, so I wouldn't create too
much code that depends on it.  I don't like the way the api assumes all
impls are file-based.


--
James Mitchell
Software Engineer / Open Source Evangelist
EdgeTech, Inc.
678.910.8017
AIM: jmitchtx

----- Original Message -----
From: "Larry Babb" <lb...@charter.net>
To: <de...@struts.apache.org>
Cc: "Larry Babb" <lb...@charter.net>
Sent: Monday, September 13, 2004 11:56 PM
Subject: Struts Database Message Resources via OJBMessageResources


I found a reference to a sourceforge project that James Mitchell developed
called OJBMessageResources and I am curious to the status.

It was last updated in April 2003. I found a reference on a mailing list
that it was/is going to be integrated into the Commons Resources and that
the Commons Resources was being planned for integration into Struts (1.3 I
think).

My questions are:

1. Does anyone know the current status of this project?
2. Or an alternative for centralizing message resources across web apps in a
single repository?
3. The OJBMessageResources project is based on the older jakarta-ojb v 0.9.4
which is now under DB Commons in Apache. Is this planned for inclusion into
struts and if so is there a more recent version?

Any help would be appreciated.
Thanks
Larry Babb



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@struts.apache.org
For additional commands, e-mail: dev-help@struts.apache.org