[EJB 3.0] - Re: Web Beans + JPA
by pete.muir@jboss.org
I agree with Carlo, whilst for the narrow scope of making WB spec compliant, I only need @Entity/orm.xml (i.e. spec'd entities) it would be much more user friendly to also extend this to provider specific entities (case in point is hbm.xml).
If necessary for EE6/AS6 we can do a simple impl:
* expose an SPI Iterable discoverOrmXml(); which should return all orm.xml in a DU (AS already has a facility to find meta-inf files in JARS), and parse it in WB for class names
* check entities for @Entity in WB
* make it possible to replace this simple impl if a container wants to (we would want to do so in JBoss for a hibernate-aware version - speed + hbm.xml)
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221621#4221621
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221621
17 years
[Clustering/JBoss] - JBoss cluster: session stickiness
by sureshrk19
Hi All,
I configured Jboss 4.2.3 2 node cluster with Apache/mod_jk connector.
The applicaion deployment (thru farm) is fine... but, I see weird behavior some times.
1) My application is using JAAS authentication. I made modifications to 'login-config.xml' of both the nodes; When I access application thru apache port, the request is sent to both the nodes and it fails first time... on page refresh, reentering the credentials works fine.
2) I specified session stickiness.. still my app. requests are routed to both the nodes; my understanding is, the session should be created on one node and all subsequent requests should be sent to the same.. if the node goes down, the session should be replicated on next node and requests should be routed to that.. but, the same is not happening in my case.
here is my conf:
Worker.properties:
worker.node1.port=8019
worker.node1.host=localhost
worker.node1.type=ajp13
worker.node1.lbfactor=1
worker.node4.port=8039
worker.node4.host=localhost
worker.node4.type=ajp13
worker.node4.lbfactor=1
worker.loadbalancer.type=lb
worker.loadbalancer.sticky_session=1
worker.loadbalancer.balance_workers=node1,node4
And Jboss xmls are modified to define 'jvmRoute'
node1:
< Engine name="jboss.web" defaultHost="localhost" jvmRoute="node1" >
node4:
I enabled
true
for both nodes.
Also, I set
true
in web.xml
Any pointers would be highly appreciated.
Thanks,
Suresh
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221618#4221618
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221618
17 years
[Security & JAAS/JBoss] - Caller Principal Set Once And Forever
by ralfsteppacher
Hi,
I am migrating an existing application from JBoss 4 to 5. I am trying to configure security with JAAS but I am struggling with what probably is a simple configuration setting.
I have a servlet that is protected with BASIC authentication. I am using the UsersRolesLoginModule to specify my own properties files for users and roles for now.
The servlet calls a stateless session bean. The application does its own authorization based on the principal returned by EJBContext.getCallerPrinciple().
The problem: The caller principle in the context handed to my stateless session bean is set exactly once when the first user logs in. And never changes ever after. If other users make subsequent calls (properly authenticated), the EJBContext always returns the principal of the first user (which srews up the authorization).
As the JBoss 4 version of the application works I assume the principal in the context did change using that server version.
Any ideas what I might have missed in the configuration? Or am I mistaken elsewhere?
I found a workaround solution in the JBoss WIKI:
Subject caller = (Subject) PolicyContext.getContext("javax.security.auth.Subject.container");
This seems to return the logged in user correctly when queried in the session bean. Is this the proper way to find out about the logged in user making a request?
Thanks and regards
Ralf
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4221612#4221612
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4221612
17 years