[JBoss Seam] - Re: Multiple Domain Quesiton
by fhh
anonymous wrote :
| I was thinking about how to do this best too for some time and I really think this is useful, not "security by obscurity", because people wont start to fiddle with something if they don't know it's there.
|
Sorry, but this is the definition of security by obscurity. Access to restricted pages should be secure especially if people start "fiddling" with them.
I'm not sure if you are aware of the fact that the hostname I use to reach your machine is entirely under my control. I can just add whatever I want to my /etc/hosts and I will see those pages.
And once you are using this as a security mechanism you will accidently rely on this because after a test on your setup it "looks" secure.
So in my opinion your security approach is like aiming the loadded shotgun at your foot and taking the safety off. You only have to wait a bit before it goes off.
Regards
Felix
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035515#4035515
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035515
19 years
[JNDI/Naming/Network] - How to find a container managed entity manager through JNDI?
by pxpwxj
How to find a container managed entity manager through JNDI?
I deployed a EAR under jboss4.0.5.GA.I have a ejb3.0 jar named a.jar which consists of three entity bean,and a web app named b.war in this ear.
I want use those entity bean in those servlets of b.war.In this case ,i do not want to use session bean.I hope can use entity bean in those servlets directory,not through session bean.Because i think those EntityBean and servlets are in the same jvm,even the same ear!To use session bean to bridge these ENTITYBEAN and servets ,is not gracefuly,and not efficiently,they are in the same ear!!
To achieve that ,I try to get a container managed entity manager in these servlets,I have tried two way use annotation,they are below:
1.@persistcontext(unit......)
EntityManager em;
this do not work,every time the variable em is null;
2.@resource(mappedname.....
in both case,i use the name of the persistent unit which defined in the persistent.xml of a.jar.
I searched many topics on google,never find a post which tell me to find a jboss managed entitymanager under jboss.But many posts said affirmatively " ...can get a container managed entity manager through jndi...",so i wonder :
a.jboss now do not surpport getting a container managed entity manager through jndi,or I used the wrong jndi name?
b.in which case can i use @persistcontext(unit......) or @resource(mappedname ,those two annotation to get a container managed entity manager ?
thank you very much for your help.I really do not want to use session bean for me,and do not want to create a app managed entitymanager under my jbossAS,it is absurd.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035514#4035514
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035514
19 years
[EJB 3.0] - How to find a container managed entity manager through JNDI?
by pxpwxj
I deployed a EAR under jboss4.0.5.GA.I have a ejb3.0 jar named a.jar which consists of three entity bean,and a web app named b.war in this ear.
I want use those entity bean in those servlets of b.war.In this case ,i do not want to use session bean.I hope can use entity bean in those servlets directory,not through session bean.Because i think those EntityBean and servlets are in the same jvm,even the same ear!To use session bean to bridge these ENTITYBEAN and servets ,is not gracefuly,and not efficiently,they are in the same ear!!
To achieve that ,I try to get a container managed entity manager in these servlets,I have tried two way use annotation,they are below:
1.@persistcontext(unit......)
EntityManager em;
this do not work,every time the variable em is null;
2.@resource(mappedname.....
in both case,i use the name of the persistent unit which defined in the persistent.xml of a.jar.
I searched many topics on google,never find a post which tell me to find a jboss managed entitymanager under jboss.But many posts said affirmatively " ...can get a container managed entity manager through jndi...",so i wonder :
a.jboss now do not surpport getting a container managed entity manager through jndi,or I used the wrong jndi name?
b.in which case can i use @persistcontext(unit......) or @resource(mappedname ,those two annotation to get a container managed entity manager ?
thank you very much for your help.I really do not want to use session bean for me,and do not want to create a app managed entitymanager under my jbossAS,it is absurd.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4035513#4035513
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4035513
19 years