[JBoss Seam] - Re: How are you handling login / registration redirects?
by cja987
I've been using @LoggedIn. It's a hack, but if it's good enough for the booking example, it's good enough for my simple CRUD app. I tweaked it a bit to return a "nologin" result in order to redirect to the login page when users attempt an action that requires a login.
I'd love to know how to send them back to the original page, since just using the http referer isn't really good enough, but I used a javascript history hack (a "go back" link) that also works (thanks in no small part to JSF/Seam's mojo). I'm okay with making my users use that approach, since it's an internal app with potentially a couple dozen users total, all quite used to even clunkier interfaces.
I hope to migrate to a "real" security system eventually, since I'll want to eventually support user roles. Hopefully there will be a simple example of it I can use by then. The seamspace example has a security mechanism, but it looks awfully complex.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006987#4006987
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006987
19 years, 2 months
[JBossWS] - webservices in jboss 5.0
by deployer_man
Hello I'm using jboss 4.0.5 in order to deploy webservices using anotations like @Webservice and @webmethod. When I deploy the aplication I get a webservice and a EJB3.0.
But when I deploy the same code in Jboss 5.0.0 the webservices doesn't work. The endpoint haven´t been publicated. Somebody can tell what I´m doing wrong.
Here an example of Webservice
anonymous wrote :
| package bean;
| import java.util.ArrayList;
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
|
| @Stateless
| @WebService
| public class j4Bean {
|
| @WebMethod
| public ArrayList getInt(int num)
| {
| ArrayList list= new ArrayList();
| list.add("Hola");
|
| return list;
| }
| }
|
Here is the interface
anonymous wrote :
| package bean;
|
| import java.util.ArrayList;
|
| import javax.ejb.Remote;
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
| import javax.jws.soap.SOAPBinding.Style;
|
| @Remote
| @WebService
| @SOAPBinding(style=Style.RPC)
| public interface j4 {
|
| @WebMethod ArrayList getInt(int num);
|
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006985#4006985
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006985
19 years, 2 months
[Clustering/JBoss] - JMS vs. Home-grown... Which is better in cluster?
by jhilgedick
All,
I could really use some help on the following question - I need to figure out if JMS in a clustered environment is really the solution to my problem...
I have an application that is deployed to a number of servers in a jboss cluster. I also have a bunch of clients that are writing to a jms queue in the cluster - they are writing (producing) these messages very quickly. My understanding is that in a jboss cluster, the queue isn't really replicated (available) across all servers in the cluster - which means that every client (producer) gets its jms "message" piped to a *single* server in the cluster. Is that correct?
My understanding is that if the "designated" jms server goes down, another node in the cluster will "take its place". Is that correct? If this is correct it means that as I scale up the number of clients (producers), they are all going to be trying to communicate with the one *single* designated jms node. Is that correct?
It seems to me I'd be better off by creating a servlet in my application that is replicated across all nodes in the cluster - and this servlet puts the messages into a db table (directly or through hibernate, etc). This is what JBoss JMS does under the covers *anyway*, isn't it? It's how JBoss makes the messages persistent, right?
Then I could have another servlet deployed on *another* cluster of servers. These servlets would "poll" the db where the messages were written (by the nodes in another cluster), attempt to mark them as "consumed" in the db and return them to the caller (consumer) if they are the one that "got the message". I realize that polling isn't the greatest solution in the world - but we can always add more nodes to the "read" cluster and space the polling...
Wouldn't something like this scale better than JBoss JMS clustering? Why not? It seems like JBoss's JMS solution is great for failover - but that it just doesn't scale...
Please show me the error of my ways...
Thanks very much!
-john
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4006984#4006984
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4006984
19 years, 2 months