Re: Basing Entity Objects on a Web Service / JMX Client and how to deal with configuration data

67 views
Skip to first unread message

Jan Vervecken

unread,
Feb 13, 2013, 2:39:44 AM2/13/13
to adf-met...@googlegroups.com
hi BradW

For reference, what looks like the same question in the OTN forum thread "ADF: Initialization properties from within an Entity"
at https://forums.oracle.com/forums/thread.jspa?threadID=2497827

regards
Jan Vervecken

On Wednesday, February 13, 2013 8:30:46 AM UTC+1, BradW wrote:
Hi Team.

I've used Entity objects a few times to front a WebService Client.  We now have a JMXClient need as well.  Both of these use cases require that the clients be configured in some fashion (URLs, UserNames, Passwords etc).  Instead of hard coding this, is there a best practice on how to initialize these clients?  Ideally, I'd like to do this via the web.xml file so that the admins can control this easily.  However, I don't think it feels right to use FacesContext inside of an EntityImpl class.  I also don't really like the idea of putting Java Options on the JVM as many applications could possibly run on a JVM.

Your thoughts on this?


Thanks,


BradW

Gerben Vermoen

unread,
Feb 13, 2013, 5:00:49 AM2/13/13
to adf-met...@googlegroups.com
Hi Brad,

Recently I had the same situation with Webcenter Content connection details in the Model layer. Using web.xml to configure the connection details didnt seem right since it kind of breaks the MVC pattern. I figured that ideally I would like to configure it the same way as a JDBC datasource, which is easily looked up via JNDI. So I decided to put the connection details in Weblogic JNDI as custom String resources. Now I can look them up with JNDI InitialContext in the Model layer. No need for deployment plans, and admins can easily change the configuration in Weblogic.

Only problem is that Weblogic seems to be the only appserver that lacks the feature to put custom String resources. So I used a Startup class as described in these posts:

Another point of attention is security when you put passwords in JNDI. If not all of your admins are allowed to see the passwords, you should take it a step further and encrypt them. Then in your app you should have a key to decrypt the passwords.

cheers,
Gerben



2013/2/13 BradW <bwor...@gmail.com>
Hi Team.

I've used Entity objects a few times to front a WebService Client.  We now have a JMXClient need as well.  Both of these use cases require that the clients be configured in some fashion (URLs, UserNames, Passwords etc).  Instead of hard coding this, is there a best practice on how to initialize these clients?  Ideally, I'd like to do this via the web.xml file so that the admins can control this easily.  However, I don't think it feels right to use FacesContext inside of an EntityImpl class.  I also don't really like the idea of putting Java Options on the JVM as many applications could possibly run on a JVM.

Your thoughts on this?


Thanks,


BradW

--
--
You received this message because you are subscribed to the ADF Enterprise Methodology Group (http://groups.google.com/group/adf-methodology). To unsubscribe send email to adf-methodolo...@googlegroups.com
 
All content to the ADF EMG lies under the Creative Commons Attribution 3.0 Unported License (http://creativecommons.org/licenses/by/3.0/). Any content sourced must be attributed back to the ADF EMG with a link to the Google Group (http://groups.google.com/group/adf-methodology).
 
---
You received this message because you are subscribed to the Google Groups "ADF Enterprise Methodology Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adf-methodolo...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages