[EJB 3.0 Users] - Re: How to improve performance of Message Driven Beans
by averri
"averri" wrote : Hi,
|
| I have a MDB with a very bad performance: the actual throughput is only 10 messages per second.
|
| I need to improve it to 100 messages per second. How can I configure JBoss/MDB to achieve this goal?
|
| I've tried to tune the 'maxSession' property, without success.
|
| My actual MDB configuration is:
|
| @MessageDriven(activationConfig = {
| | @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| | @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),
| | @ActivationConfigProperty(propertyName = "maxSession", propertyValue="10"),
| | @ActivationConfigProperty(propertyName = "minSession", propertyValue="10"),
| | @ActivationConfigProperty(propertyName = "maxMessages", propertyValue="1")
| | })
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258688#4258688
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258688
15 years, 3 months
[EJB 3.0 Users] - How to improve performance of Message Driven Beans
by averri
Hi,
I have a MDB with a very bad performance: the actual throughput is only 10 messages per second.
I need to improve it to 100 messages per second. How can I configure JBoss/MDB to archive this goal?
I've tried to tune the 'maxSession' property, without success.
My actual MDB configuration is:
@MessageDriven(activationConfig = {
| @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"),
| @ActivationConfigProperty(propertyName = "destination", propertyValue = "queue/testQueue"),
| @ActivationConfigProperty(propertyName = "maxSession", propertyValue="10"),
| @ActivationConfigProperty(propertyName = "minSession", propertyValue="10"),
| @ActivationConfigProperty(propertyName = "maxMessages", propertyValue="1")
| })
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258686#4258686
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258686
15 years, 3 months
[EJB 3.0 Users] - "Application Scope" in EJB project?
by mwx.dennis
In my project, Application clients access a JBoss AS via RMI.
Each client is assigned to a specific category, but only one client per category is allowed at the same time (so there may be mutliple clients connected to the AS simultaneously, but only one of each category).
How do I implement this? In a non-EJB environment I'd use synchronized login/logout methods which manage a flag for each category. But both synchronization and an application-like scope are unavailable in EJBs, right?
The obvious solution would be to have a database remember the login state and handle the concurrency issue. However, this seems a bit of an overkill and so far I do not need a database and I'd love to keep it like that.
Any input would be greatly appreciated!
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258678#4258678
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258678
15 years, 3 months
[JBoss Cache Users] - Jboss AS 4.2 to 5.1.0 Caching problem O_o
by vergereau
Hello,
I'm a bit confuse with JBoss AS 5.1.0 concerning Caching.
I switch my application from JBoss AS 4.2 to 5.1.0 and I'm little surprise to see that doesn't work.
So I look the documentation on the http://www.jboss.org/file-access/default/members/jbossejb3/freezone/docs/... but change nothing. I have a not classFound org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory etc etc
Conf on Jboss 4.2.3
| <persistence-unit name="OracleTest">
|
| <jta-data-source>java:/oracleDSTest</jta-data-source>
| <properties>
| <property name="hibernate.hbm2ddl.auto" value="update" />
| <property name="hibernate.cache.use_second_level_cache" value="true"/>
| <property name="hibernate.cache.use_query_cache" value="true"/>
| <property name="hibernate.cache.region.factory_class" value="org.hibernate.cache.jbc2.JndiMultiplexedJBossCacheRegionFactory"/>
| <property name="hibernate.cache.region.jbc2.cachefactory" value="java:CacheManager"/>
| <property name="hibernate.cache.region.jbc2.cfg.entity" value="mvcc-entity"/>
| <property name="hibernate.cache.region.jbc2.cfg.query" value="local-query"/>
| <property name="hibernate.cache.region_prefix" value="OracleTest"/>
| <property name="hibernate.show_sql" value="true" />
| </properties>
| </persistence-unit>
|
Anyone can help me to know how to set up caching on JBOSS 5.1.0 ?
Regards, Jérôme
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258668#4258668
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258668
15 years, 3 months
[Security] - Re: Caller unauthorized on using a ejb3 statetlesssessionbea
by praenti
Using the Webauthentication does only have to be used from the interceptor instead of my own LoginFacade as I have seen. First of all is this correct?
So I hope I've moved to WebAuthetication in the correct way. I have seen a example how to implement a struts 1 filter. I have used the code to implement my struts 2 interceptor.
And this is the current error:
| 15:05:30,318 DEBUG [RealmBase] Username extern.michael.obster does NOT have role AdminUser
|
The login principal in the LoginModule gives me a mapping "extern.michael.obster" to "AdminUser", so this is in some way a discrepance, which I suppose that s.th. of the security context is lost (therefor I wanted to have "deeper" debugging, but I don't see a way how to do it because I cannot get a better acces into the JBossWebRealm.java).
This is my new JaasLoginInterceptor:
| /**
| *
| */
| package vwg.audi.cancard.ui.interceptor;
|
| import javax.servlet.ServletException;
| import javax.servlet.http.HttpServletRequest;
|
| import org.apache.log4j.Logger;
| import org.apache.struts2.ServletActionContext;
| import org.jboss.web.tomcat.security.login.WebAuthentication;
|
| import vwg.audi.cancard.business.LoginFacade;
| import vwg.audi.cancard.ui.JAASConstants;
|
| import com.opensymphony.xwork2.Action;
| import com.opensymphony.xwork2.ActionInvocation;
| import com.opensymphony.xwork2.interceptor.Interceptor;
|
| /**
| * JAASLoginFilter
| *
| * @author Michael Obster
| */
| public class JAASLoginInterceptor implements Interceptor {
|
| private static final long serialVersionUID = -1983088770872827621L;
|
| private Logger log = Logger.getLogger(this.getClass());
|
| String loginDomain = "";
| String clientLoginDomain = "";
|
| LoginFacade loginFacade;
|
| @Override
| public void init() {
|
| }
|
| @Override
| public String intercept(ActionInvocation actionInvocation) throws Exception {
| HttpServletRequest request = ServletActionContext.getRequest();
|
| String servletPath = request.getServletPath();
| String pathInfo = request.getPathInfo();
| String path = (servletPath == null ? "" : servletPath)
| + (pathInfo == null ? "" : pathInfo);
| if (log.isDebugEnabled()) {
| log.debug("Login INTERCEPT");
| }
|
| if (!JAASConstants.USER_IS_VALID.equals(request
| .getSession().getAttribute(
| JAASConstants.USER_VALIDITY))) {
| log.info("requested path: " + path);
| return Action.LOGIN;
| }
|
| //Get the user name and password based on some attributes from your FORM post
| String username = (String) request.getSession().getAttribute(JAASConstants.USERNAME); //username can be any attribute
| String pass = (String) request.getSession().getAttribute(JAASConstants.PASSWORD); //pass can be any attribute
|
| if(username == null || pass == null) {
| throw new RuntimeException("username or password is null");
| }
| WebAuthentication pwl = new WebAuthentication();
| pwl.login(username, pass);
|
| if (log.isDebugEnabled()) {
| //Only when there is web login, does the principal be visible
| log.debug("User Principal="+request.getUserPrincipal());
| //Some basic checks to see if the user who just did a programmatic login has a role of "AuthorizedUser"
| log.debug("isUserInRole(Authorized User)="+request.isUserInRole("AdminUser"));
| }
|
| if(request.getUserPrincipal() == null || !request.isUserInRole("AdminUser")) {
| throw new ServletException("User is not authenticated or the isUserInRole check failed");
| }
|
| //Log the user out
| pwl.logout();
|
| if(request.getUserPrincipal() != null || request.isUserInRole("AdminUser")) {
| throw new ServletException("User is still authenticated or pass: isUserInRole(Authorized User)");
| }
|
| return actionInvocation.invoke();
| }
|
| @Override
| public void destroy() {
| // loginFacade.logout();
| }
|
| }
|
View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4258664#4258664
Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4258664
15 years, 3 months