Alan, Have you thought about using the EJB method level security features? It might do the trick for you. You could declare all of your 'publicly' accessible methods to be accessible by '*' and then make your 'privately' accessible methods only accessible by a particular account.
The calling user is determined by your JNDI connection, essentially. So, from your other beans which need to have access to those 'private' methods, just make sure you connect to JNDI as the appropriate user. That username/password combination could even be encapsulated in a properties file so that it wouldn't be 'hardcoded'. Well, I don't want to ramble on any more about this if you have all ready considered this approach. If you have, and it won't work, maybe I still don't understand what you're trying to accomplish. Feel free to drop me an email if you want to try and hash through something. Kristian -----Original Message----- From: Alan Honczar [mailto:[EMAIL PROTECTED]] Sent: Wednesday, December 26, 2001 11:22 AM To: JRun-Talk Subject: RES: Protecting methods Thanks, as I told in the first mail, the package name is the same, but the runtime package is not the same. Package private won't work. travis, you can't protect an EJB method that you want to let clients use trought Remote Interface. I think I gotta write my own protecting code... Thank you very much. Alan -----Mensagem original----- De: Jeff Ramin [mailto:[EMAIL PROTECTED]] Enviada em: sexta-feira, 21 de dezembro de 2001 17:07 Para: JRun-Talk Assunto: Re: Protecting methods Actually, that's not correct. If you want the method to be available only to other classes in the same package, that level of access is generally called "package private". You achive that by not using any modifier at all. If you use the protected modifier, subclasses would also have access. [EMAIL PROTECTED] wrote: > > put protected before the function name... > > Not sure if this is what you are looking for, but it sounds like it. Pretty basic Java. > > protected void setWhatever(){ > > Travis > > ---- Original Message ---- > From: Alan Honczar <[EMAIL PROTECTED]> > Sent: 2001-12-21 07:06:10.0 > To: JRun-Talk <[EMAIL PROTECTED]> > Subject: Protecting methods > > Hi, > I am writing an EJB that has many methods > to access the DB, and I am trying to protect them > to only be called from EJBs from the same package. > I clustering and using Remote Interface to call that > methods. Do you know a way to make them protected? > Any clues or other ways to do the same? > > Sorry about the inconvenience of this sort of > question here... > > TIA, > > ______________________________________________________________________ Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists
