cancel
Showing results for 
Search instead for 
Did you mean: 

JNDI Service Provider for user config?

Former Member
0 Kudos

I've posted a similar topic in the Web Dynpro forum, but I'm posting a possible solution here since it's more applicable to normal Java coding....

I would like to build a generic framework to store user configuration information - things like preferences, last selections, that sort of thing. This information would be used to maintain state between user sessions. For example, storing the object id of the last item the user was working with, so tomorrow they could sign in and continue from where they left off...

I was thinking of constructing a set of database tables, and bulding an API around these tables. Pretty simple to implement a tree structure to manage user config.

Then I thought about JNDI, and how it's used to access the portal content directory - this is very similar to what I want to do: store artibrary, serializeable Java objects in a tree structure by user, and then have the ability to fetch these items from the tree using a standard api - JNDI. Searching isn't quite as important, since generally the application would know exactly what they were looking for.

Is this feasable, or is using JNDI for something like this completely overkill? I've never even remotely thought about using JNDI like this before, so I'm working from a blank slate. If someone has done something like this before (implement a JNDI Service Provider over a set of database tables), I'd love to hear from you.

Of course, comments telling me I'm nuts are appropriate as well. Perhaps not as welcome as real help tho

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Ken,

Did you take into account that after server restart the JNDI will be empty ? I.e. you wrote that

"so tomorrow they could sign in and continue from where they left off..."

well, if you reboot the server at night, they won't be able to.

In addition the JNDI is not used classically for replacement of database and other persistency usage of information. I am not sure what will happen if you start putting enterprise amount of information and you have tens of thousands of users.

Btw, you wrote : "constructing a set of database tables, and bulding an API around these tables ". Btw, there are some more standard and fast to implement aproaches to such

task - EJB and CMP beans, JDO, some other O/R mapping tools.... Generating those quickly with some wizards seems to be the stanard j2ee programming way.

Hope this helps

Peter

Former Member
0 Kudos

Hi Ken,

This is feasible.

Even am in the process of doing something very similar.

Perhaps these links might help:

http://help.sap.com/saphelp_nw04/helpdata/en/b0/f6fb4028b5f86fe10000000a1550b0/frameset.htm

http://help.sap.com/saphelp_nw04/helpdata/en/b5/bdfc3f48ecc742e10000000a1550b0/frameset.htm

Also have a look at this posting