[JBossCache] - Re: Buddyrep issue
by FredrikJ
I tried a snapshot build from SVN (revision 4982) but the result is still the same .
Actually I was not entirely accurate in the sequence description. It should be like this:
1. Cache A starts
2. Cache A adds 10 nodes to the cache
3. Cache B starts
4. Cache B 'gets' 9 nodes thus causing a gravitation
I'm not sure why I decided to gravitate 9/10 nodes, but there it is. I have modified a producer log to include the sequence numbers so you can follow the sequences in the log better. You can find a log containing the sequences here: http://www.robotsociety.com/cache/br/producer_seq.log
You can see a comparison between running the provided test for 2.0.0 GA and 2.1.0 CR2 here:
2.0.0 GA producer log : http://www.robotsociety.com/cache/br/2.0.0/producer_2.0.0.log
2.1.0 CR2 producer log : http://www.robotsociety.com/cache/br/2.1.0%20CR2/producer_2.1.0_cr2.log
To sum the comparison up, the 2.0.0 GA and 2.1.0 CR2 are equal until data has gravitated. Then we can see that for 2.0.0 GA the cache in the producer looks like:
2.0.0 GA:
| null {}
| /9 {4=85969gehp9xt}
| /_BUDDY_BACKUP_ {}
| /192.168.1.135_51890 {}
| /3 {4=xapfkubptgx0}
| /5 {2=17z0dcpunsivo}
| /7 {2=1kr0r0fpucxmy}
| /2 {1=1cdp3dootdbu9}
| /0 {0=cvwo5pn5r7ou}
| /4 {4=1wzvk2sq01r1p}
| /8 {0=1vfthyv0lbkvw}
| /6 {2=i5az9hje5gxo}
| /1 {0=10eaf93uzvsru}
And for 2.1.0 CR2:
2.1.0 CR2:
| null {}
| /9 {0=13gmz9ol9twc}
| /_BUDDY_BACKUP_ {}
| /192.168.1.135_51892 {}
| /3 {1=kf0p8vtuad5y}
| /5 {4=uvykukzoi2h0}
| /7 {1=zaouao7ntsy7}
| /2 {0=ib5tifo2tqco}
| /0 {4=1d1boyx12sha7}
| /4 {2=gyxlbtnjgpc}
| /8 {3=1ivb35jlxspf2}
| /6 {0=pte5ws2mpe11}
| /1 {1=1erqp88pgexrv}
| /192.168.1.135_51891 {} // <--- wtf?
As I stated before in my first slightly confusing post, it is not the fact that we get an additional (recursive) buddy node in the cache that is the dealbreaker for us. But I strongly believe that this is one of, if not the, cause for the lock timeouts we see. Remember that for 2.0.0 GA buddy rep works like a charm for us, but with 2.1.0 CR2 it is broken. Given that and the fact that the caches are in different states after a gravitation has occurred using the simple test code provided, indicates to me that something has changed and/or a regression has occurred.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117127#4117127
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117127
18 years, 6 months
[JBoss Messaging] - Re: MDB and clustered Topics
by timfox
A Topic is JMS mechanism for publish-subscribe messaging.
This basically means that multiple subscribers can subscribe to a particular topic (e,g, a news feed), and _all_ the subscribers will receive messages posted to that topic.
JMS also supports what is known as point to point messaging using Queues. In this mode, a message is posted to a queue, and is only consumed by a single consumer.
An example of this would be an order processing queue, where you only want each order to be processed by one order processor.
Since you only want your message processed by one consumer, sounds like you want to use a queue rather than a topic.
If you use a non clustered topic, then all consumers on *that node* will receive all messages published to the topic.
If you use a clustered topic, then all consumers on *all nodes* will receive all messages published to the topic.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117124#4117124
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117124
18 years, 6 months
[JBoss Seam] - Re: How to control end of conversations/state of stateful be
by pete.muir@jboss.org
"schlafsack" wrote : "pete.muir(a)jboss.org" wrote :
| | | * submitting a search query using the button.
| | | * navigation forwards though the results using the next link.
| | | * navigation backwards though the results using the previous link.
| | |
| |
| | I'd also like the submission of a new query to start a new conversation. Ideally, clicking the button should end the existing conversation and begin a new one. So far I can't see an easy way of doing this.
|
| Normally you wouldn't make a search screen conversational. Why do you want to make it conversational?
|
| If you really do want to make it conversational, then you can use <end-conversation before-redirect="true" /> in pages.xml, and start a new conversation after the redirect. But I don't think this is the best way to write a search screen.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117120#4117120
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117120
18 years, 6 months
[JBoss Seam] - authenticator invocation / EL issue
by seamdev
Hi,
Let me start with background of issue I have. My authenticator method uses an external web service, multiple invocation of this method on a failed attempt causes the account to be locked earlier then expected. Locking of account is controlled by the external service. Hence, I really need to ensure that authenticator is invoked only once. Please see that in this scenario the guarantee that login failed event is raised only once is not useful as that event is can't be seen by the authentication service.
After reading JIRA issue 2165, I understand that I need to invoke Identity.isLoggedIn(false) instead of Identity.isLoggedIn() to avoid multiple invocation of authenticator. My app uses identity.isLoggedIn as an EL expression in pages.xml file. If I change this EL expression to identity.isLoggedIn(false), I get an error page on Login attempt as that EL expression gets mapped to Identity.isLoggedIn(java.lang.Boolean) instead of Identity.isLoggedIn(boolean).
My questions:
1. Is there way to write el expression that will map parameter type to boolean instead of java.lang.Boolean?
2. Is there a better way to ensure authenticator is invoked only once?
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117119#4117119
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117119
18 years, 6 months
[JBoss Seam] - Re: How to control end of conversations/state of stateful be
by pete.muir@jboss.org
"trouby" wrote : My case? I think it's any case with buttons that always exist on the template,
|
| Lets make an example:
| I have a top menu(that is always with visible) with few options,
| [my items: a, b, c, d]
|
| Pressing on one item should start a conversation, as this item is heavily being managed later on.
|
| I have added a 'done' button with propagation='none' but no one is using it : )
So the menu items should have propagation="none". Why do you need to start a lrc immediately on clicking on the menu item (this is the use case we are interested in, of course you want to be able to navigate away in a freeform way from within another conversation).
If really need to start a new lrc from a menu item, set the propagation to none, and start up a new conversation on the destination page using pages.xml.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117117#4117117
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117117
18 years, 6 months
[JBoss Messaging] - MDB and clustered Topics
by jduty
I've tried to answer this question myself through forms and the documentation but I've been unable (probably due to my own misunderstanding).
Env:
JBoss 4.2.2
JBoss Messaging 1.4.0.SP1
I have a node of 3 servers, and I'm deploying the same ear to all 3. In that ear I have a MDB that consumes from a topic using a durable subscription where I specify the sub name and client id.
So what this means is that each server has an instance of the MDB that consumers from a topic using the same sub name and client id. My question is should this topic be clustered? When a message is posted to the topic I only want 1 of the mdb instances in the cluster to get a copy, not one on all 3 machines?
Thanks in advance.
~Jonathan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117112#4117112
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117112
18 years, 6 months
[Installation, Configuration & DEPLOYMENT] - JBoss + custom tags error
by starkc
I have a confounding error while doing a migration from WebLogic to JBoss involving custom JSP tags. Tags appear to stop instantiating new tag objects between requests. The first few times I hit a page, it will perform the tag correctly, but later requests result in errors that seem to trace back to the tag object itself not being instantiated. I post this here in the configuration forum because the code has worked before and I'm willing to bet I have a small error that may be tripping everything here up.
As an example, I coded a custom tag that loops over the values in an ArrayList and prints trace statements to the console and to the jsp that uses the tag.
Tag:
| package com.cybersource.riskmanager.admin.tag;
|
| import java.io.IOException;
| import java.sql.SQLException;
| import java.util.ArrayList;
| import javax.naming.NamingException;
| import javax.servlet.jsp.JspTagException;
| import javax.servlet.jsp.PageContext;
| import javax.servlet.jsp.tagext.IterationTag;
| import javax.servlet.jsp.tagext.TagSupport;
|
| public class TestBusinessListTag extends TagSupport implements IterationTag
| {
|
| private ArrayList businesses = new ArrayList();
|
| private int numBusinesses;
| private int currentBusiness;
|
| public TestBusinessListTag()
| {
| System.out.println( "DEBUG ---- CONSTRUCTOR" );
|
| businesses.add( "a" );
| businesses.add( "b" );
| businesses.add( "c" );
| businesses.add( "d" );
|
| numBusinesses = 0;
| currentBusiness = 0;
| }
|
| public void resetAll()
| {
| businesses.clear();
| businesses.add( "a" );
| businesses.add( "b" );
| businesses.add( "c" );
| businesses.add( "d" );
|
| currentBusiness = 0;
| }
|
| public int doStartTag() throws JspTagException
| {
| try
| {
| pageContext.getOut().print( "doStartTag()<br>" );
| }
| catch( IOException ioe )
| {
| throw new JspTagException( ioe.getMessage() );
| }
| /* catch(NamingException namingexception)
| {
| throw new JspTagException("Unable to contact the database connection pool to get a connection.");
| }
| catch(SQLException sqlexception)
| {
| throw new JspTagException("The database query to retrieve the list of businesses failed.");
| }
| */
| numBusinesses = businesses.size();
| if(numBusinesses > 0)
| {
| super.pageContext.setAttribute("anyBusinesses", Boolean.TRUE);
| nextBusiness();
| return 1;
| } else
| {
| super.pageContext.setAttribute("anyBusinesses", Boolean.FALSE);
| return 0;
| }
| }
|
| public int doEndTag() throws JspTagException
| {
| try
| {
| pageContext.getOut().print( "doEndTag()<br>" );
| }
| catch( IOException ioe )
| {
| throw new JspTagException( ioe.getMessage() );
| }
|
| super.pageContext.removeAttribute("rowBusiness");
| return 6;
| }
|
| public int doAfterBody() throws JspTagException
| {
| try
| {
| pageContext.getOut().print( "doAfterTag()<br>" );
| }
| catch( IOException ioe )
| {
| throw new JspTagException( ioe.getMessage() );
| }
|
|
| if(currentBusiness == numBusinesses)
| {
| System.out.println( currentBusiness + " == " + numBusinesses );
| return 0;
| }
| else
| {
| System.out.println( currentBusiness + " != " + numBusinesses );
| nextBusiness();
| return 2;
| }
| }
|
| public void nextBusiness() throws JspTagException
| {
| if( currentBusiness >= numBusinesses )
| {
| System.out.println( "You cant fool me!" );
| //resetAll();
| }
|
| try
| {
| pageContext.getOut().print( "nextBusiness()<br>" );
| pageContext.getOut().print( "CURRENT BUSINESS: " + (String)businesses.get(currentBusiness) );
| }
| catch( IOException ioe )
| {
| throw new JspTagException( ioe.getMessage() );
| }
|
| super.pageContext.setAttribute("rowBusiness", businesses.get(currentBusiness));
| currentBusiness++;
|
| }
| }
|
Which is embedded in a simple jsp as follows:
| <%@ page import="com.cybersource.riskmanager.admin*" %>
| <%@ taglib uri="/riskmanageradmin" prefix="rma" %>
|
| <html>
| <body>
| <h1>Testing sample tag</h1>
|
| <rma:test-business-list>
| <br>
| INSIDE TAG
| <br>
| </rma:test-list>
|
| </body>
| </html>
|
When this runs, it will begin by running correctly, spitting out tracing statements as it goes through the logic of the tag, along with the "INSIDE TAG" tracing to show that it is going through the inside of the tag as well.
After a refresh or two, an error is returned, as follows:
| org.apache.jasper.JasperException: Exception in JSP: /testtag.jsp:8
|
| 5: <body>
| 6: <h1>Testing sample tag</h1>
| 7:
| 8: <rma:test-business-list>
| 9: <br>
| 10: INSIDE TAG
| 11: <br>
|
|
| Stacktrace:
| org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:504)
| org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:393)
| org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
| root cause
|
| java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
| java.util.ArrayList.RangeCheck(ArrayList.java:507)
| java.util.ArrayList.get(ArrayList.java:324)
| com.cybersource.riskmanager.admin.tag.TestBusinessListTag.nextBusiness(TestBusinessListTag.java:127)
| com.cybersource.riskmanager.admin.tag.TestBusinessListTag.doStartTag(TestBusinessListTag.java:67)
| org.apache.jsp.testtag_jsp._jspx_meth_rma_test$1business$1list_0(testtag_jsp.java:92)
| org.apache.jsp.testtag_jsp._jspService(testtag_jsp.java:66)
| org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
| org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
| org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
| javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
|
The tag appears to pick up where it left off after the previous request, and jumps into the nextBusiness() method, where it errors out by trying to get a value out of the bounds of the ArrayList.
If I uncomment the resetAll() method in nextBusiness(), the tag works as intended to, every time, unfortunately this is not a viable solution for the migration.
Thanks for your help and comments in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117095#4117095
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117095
18 years, 6 months
[EJB 3.0] - EJB3 with Eclipse
by pipo323400
Hi,
We are trying to work a simple EJB 3 application. Our goal is to post a stateless bean and acces to it from a web application.
We are developing it with eclipse. Here is the program structure:
-A java application that contains two interfaces and the bean (also a metainf) to implement the stateless bean.
-A web application 2.4 (we had tried also with 2.5).
We deploye the bean as a jar in the jboss, and it seems to recognize it. But when we try to acces with the web app (via servlet) we got an java.nullPointerException.
Ejb Code:
| import java.sql.ResultSet;
| import java.sql.SQLException;
| import javax.ejb.Remote;
|
|
| /**
| * This is the business interface for Carp enterprise bean.
| */
| @Remote
| public interface EjbRemote {
|
| boolean doStatement(String queryName) throws SQLException;
|
| ResultSet doQuery(String query) throws SQLException;
|
| void printQuery(String query);
| }
|
| import java.sql.ResultSet;
| import java.sql.SQLException;
| import javax.ejb.Local;
| @Local
| public interface EjbLocal {
|
| boolean doStatement(String queryName) throws SQLException;
|
| ResultSet doQuery(String query) throws SQLException;
|
| void printQuery(String query);
| }
|
| import javax.annotation.Resource;
| import javax.ejb.Stateless;
| import javax.sql.DataSource;
| import java.sql.Statement;
| import java.sql.Connection;
| import java.sql.ResultSet;
| import java.sql.SQLException;
|
| @Stateless
| public class EjbBean implements EjbLocal, EjbRemote {
|
| @Resource(mappedName = "TACWDS") DataSource TACWDS;
|
| public EjbBean() {
|
| }
|
| public boolean doStatement(String query) {
| //TODO implement doStatement
| return false;
| }
|
| public final ResultSet doQuery(String query) throws SQLException {
| System.out.println("Esecuzione query : " + query);
| Connection conn = TACWDS.getConnection();
| Statement stm = conn.createStatement();
| return stm.executeQuery(query);
| }
|
| public final void printQuery(String query) {
| System.out.println("Esecuzione query : " + query);
| }
| }
|
Servlet Code:
|
| public class appServlet extends HttpServlet {
| @EJB EjbLocal sless;
|
| public void service(HttpServletRequest req, HttpServletResponse resp)
| throws ServletException, IOException{
|
| resp.setContentType("text/html");
| PrintWriter out = resp.getWriter();
| //sless.printQuery("SELECT * FROM FOO");
|
| System.out.println("sless state: "+sless);
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117092#4117092
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117092
18 years, 6 months
[EJB 3.0] - How to size EJB3 continer for EJB3 stateless session beans (
by andyredhead
Hi,
I'd like to know if anyone has any guidelines or techniques for sizing the instance pool for EJB3 stateless session beans in JBoss 4.2.1?
We are going live with an EJB3 based application and I'd like to know if I've got the EJB3 container configured sensibly...
In ejb3-interceptors-aop.xml I've got the references to:
| <annotation expr="!class((a)org.jboss.annotation.ejb.PoolClass)">
| @org.jboss.annotation.ejb.PoolClass (value=org.jboss.ejb3.ThreadlocalPool.class, maxSize=300, timeout=10000)
| </annotation>
|
Which means I've multiplied the default by 100!
How can I tell if this is too big or too small?
Are there any other parameters I should be changing to run the EJB3 container under heavy load on poweful servers?
We will be running on jdk1.5_13, solaris 10, sun T2k servers (if that makes any difference).
Thanks
Andy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117081#4117081
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117081
18 years, 6 months
[JBoss Seam] - Re: How to control end of conversations/state of stateful be
by schlafsack
"pete.muir(a)jboss.org" wrote : Post your use case for this.
If I understand the topic of this thread, I *think* I've come up against a similar problem in the search application I'm writing to learn seam.
My application has one page with a text box, a button, a results table and next/previous buttons.
I'd like to define a conversation as:
| * submitting a search query using the button.
| * navigation forwards though the results using the next link.
| * navigation backwards though the results using the previous link.
|
I'd also like the submission of a new query to start a new conversation. Ideally, clicking the button should end the existing conversation and begin a new one. So far I can't see an easy way of doing this.
With a simple @Begin attribute on the search method, performing a second search throws an exception - which is expected, we are already in a conversation.
Using @Begin(join=true) does not meet the requirement of starting a new conversation per search.
I could add a clear button that calls an @End attributed method but this is does not really meet your average user's expectations of a search tool.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117080#4117080
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117080
18 years, 6 months
[JBoss Seam] - Extended EL support (with parameters) -> MethodNotFoundExcep
by rizzojo
Hi, I'm a Seam newbie trying to learn it.
I've an issue with the use of extended EL in datatables to pass parameters.
I can make the booking example (tutorial) work and it uses that feature.
But I cannot make it work for my project.
(fragment of) The xhtml code of the table:
| <h:dataTable var="usr" value="#{userList}" rendered="#{userList.rowCount>0}">
| <h:column>
| <f:facet name="header">
| <h:outputText value="User Name"/>
| </f:facet>
| #{usr.userName}
| </h:column>
| <h:column>
| <f:facet name="header">
| <h:outputText value="User ID"/>
| </f:facet>
| <s:link value="#{usr.id}" action="#{userEdit.selectUser(usr)}"/>
| <s:link value="#{usr.id}" action="#{userEdit.selectTest}"/> User(usr)
| </h:column>
|
| </h:dataTable>
|
This table contains 2 columns with:
- #{usr.userName}
- links with #{usr.id}
In the second column, the first link has a parameter
<s:link value="#{usr.id}" action="#{userEdit.selectUser(usr)}"/>
and the other link has no parameter (other method)
<s:link value="#{usr.id}" action="#{userEdit.selectTest}"/>
Here is the Java code of the "userEdit" seam bean, which is a SFSB.
| @Stateful
| @Scope(EVENT)
| @Name("userEdit")
| public class UserEditAction implements UserEdit {
| ....
| public void selectUser(UserProfile selectedUser) {
| System.out.println("EDITINGUSER Selected: "+ editingUser);
| }
|
| public void selectTest(){
| System.out.println("LINK WORKS");
| }
| }
|
The Problem:
The first link (with the parameter, extended EL) does not work, while the second link (no parameter, standard EL) works well.
In the browser, here are the urls of each links:
1ST:
http://localhost:8080/TestWeb/userlist.seam?dataModelSelection=usr%3Auser...
2ND:
http://localhost:8080/TestWeb/userlist.seam?dataModelSelection=usr%3Auser...
On the JBoss console, seam produces a stack trace when clicking the first link.
| 15:30:54,735 ERROR [SeamPhaseListener] uncaught exception
| javax.el.MethodNotFoundException: Method not found: UserEditAction:a2s3g6b-z96rab-fb0tnazx-1-fb0treof-s.selectUser(be.post.jr.domain.UserProfile)
| at org.jboss.el.util.ReflectionUtil.findMethod(ReflectionUtil.java:215)
| at org.jboss.el.util.ReflectionUtil.invokeMethod(ReflectionUtil.java:273)
| at org.jboss.el.parser.AstMethodSuffix.getValue(AstMethodSuffix.java:59)
| at org.jboss.el.parser.AstMethodSuffix.invoke(AstMethodSuffix.java:65)
| at org.jboss.el.parser.AstValue.invoke(AstValue.java:96)
| at org.jboss.el.MethodExpressionImpl.invoke(MethodExpressionImpl.java:276)
| at org.jboss.seam.core.Expressions$2.invoke(Expressions.java:174)
| at org.jboss.seam.navigation.Pages.callAction(Pages.java:634)
|
Note in the stack trace, that some strange string has been added to the name of the method:
UserEditAction:a2s3g6b-z96rab-fb0tnazx-1-fb0treof-s.selectUser(be.post.jr.domain.UserProfile)
I must admit that I cannot find the cause by myself, even with comparing with the book (Yuan) and the examples.
Does anybody have an idea for me ?
Many thanks.
John Rizzo.
Environment:
Facelets
Seam 2.0.1.CR1.
JBoss-4.2.2.GA
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117076#4117076
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117076
18 years, 6 months
[JBoss Portal] - Using a commandLink with tomahawk tree2
by alex.alvarez
Hello,
I am using myfaces1.1.5 with tomahawk1.1.6, using facelets and JBoss Portal 2.6.3
I have a t:tree2 component where each node has an embedded commandLink. Here is the code:
<t:tree2 id="serverTree" value="#{editUser.treeData}" var="node" varNodeToggler="t" clientSideToggle="false" showNav="true" imageLocation="/images">
...
<f:facet name="dynamic-folder">
<h:panelGroup>
<h:commandLink immediate="true" action="#{t.toggleExpanded}" actionListener="#{editUser.expandDynamicFolder}">
<t:graphicImage value="/images/folder-open.png" rendered="#{t.nodeExpanded}" />
<t:graphicImage value="/images/folder.png" rendered="#{!t.nodeExpanded}" />
<h:outputText value="#{node.description}" styleClass="nodeFolder"/>
</h:commandLink>
</h:panelGroup>
</f:facet>
I was able to click in the nodes and launch the commandLink action before i switched to Facelets. Now it doesn't work or it works on the first or second request and then nothing... If I look at the request parameters I see that the selected Node is there but the component doesn't seem to be able to decode it....
Parameters[docNum=1 | org.apache.myfaces.portlet.MyFacesGenericPortlet.VIEW_ID=/WEB-INF/jsf/userAdmin.xhtml | _id15jbpns_2fSmartPortal_2fdefault_2f35snpbj_SUBMIT=1 | _id15jbpns_2fSmartPortal_2fdefault_2f35snpbj:_link_hidden_= | _id15jbpns_2fSmartPortal_2fdefault_2f35snpbj:_idcl=_id15jbpns_2fSmartPortal_2fdefault_2f35snpbj:
serverTree:0:1:0:0:_id129jbpns_2fSmartPortal_2fdefault_2f35snpbj]
Any ideas?
regards,
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117075#4117075
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117075
18 years, 6 months
[JBossCache] - Re: Buddyrep issue
by FredrikJ
We do apply session affinity.
Look at this way:
1. Cache A starts
2. Cache A adds 10 nodes to the cache
3. Cache B starts
4. Cache B 'gets' the 10 nodes thus causing a gravitation
After #4 in the sequence we end up with the weird buddy rep settings as discussed above. This is exactly what we are doing in the test provided. We only go through the sequence once, we do not keep modifying/adding etc to the cache. (There is also a 5 second sleep between 3 and 4).
Just to clarify:
We do not add data to the cache while trying to read it.
We do not modify data to the cache while trying to read it.
In fact there is no concurrent access at all in the test provided.
The issue is clearly related to data gravitation, in the logs we see that the buddy backup is correctly setup before gravitation occurs (i.e. after #3 in the sequence above), but has changed to include itself after data gravitation has occurred (after #4 in the sequence).
I'll try and make a comparison run with 2.0.0 GA and post the logs, if behavior is unchanged then we should get the same buddy backup result.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117065#4117065
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117065
18 years, 6 months
[JNDI/Naming/Network] - javax.naming.NoInitialContextException: Can't find property:
by joepareti
I am developing a demo based on JBOSS 4.2.0.CR2 on Linux RHEL 3/x86.
The demo includes an EJB (stateless session bean), and a client app that requests services from the bean.
I invariably get the following rt error when launching the client as
# ant runClientApp
[java] javax.naming.NoInitialContextException: Can't find property: java.naming.factory.initial
[java] at javax.naming.spi.NamingManager.getInitialContext(j ava.util.Hashtable) (/lib/ssa/libgcj.so.4.0.0)
[java] at javax.naming.InitialContext.getDefaultInitCtx() (/lib/ssa/libgcj.so.4.0.0)
[java] at javax.naming.InitialContext.getURLOrDefaultInitCtx (java.lang.String) (/lib/ssa/libgcj.so.4.0.0)
[java] at javax.naming.InitialContext.lookup(java.lang.Strin g) (/lib/ssa/libgcj.so.4.0.0)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.connect() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.init() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorPane l.LoanCalculatorPanel() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorClie nt.LoanCalculatorClient() (Unknown Source)
[java] at za.co.solms.finance.calculators.LoanCalculatorClie nt.main(java.lang.String[]) (Unknown Source)
my jndi.properties, available in classpath and also under $JAVA_HOME, is as follows:
(I also saw jndi.properties is included in the client jar file, so I assume it is taken into account):
java.naming.factory.initial=org.jnp.interfaces.Nam ingContextFactory
java.naming.provider.url=jnp://localhost:1099
java.naming.factory.url.pkgs=org.jboss.namingrg. jnp.interfaces
jnp.socketFactory=org.jnp.interfaces.TimedSocketFactory
#Connection timeout (0 == blocking)
jnp.timeout=0
#Read timeout (0 == blocking)
jnp.sotimeout=0
Finally, I started playing around with the client code by e.g. changing the name of the bean in the lookup function ...
Object beanHomeRef
= jndiContext.lookup(jndiName);
into
Object beanHomeRef
= jndiContext.lookup("local/ejb/LoanCalculator");
but without any results
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117059#4117059
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117059
18 years, 6 months
[JBossCache] - Re: Buddyrep issue
by manik.surtani@jboss.com
Sorry, I didn't quite understand your use case in the beginning.
If you are adding data to .5 while at the same time reading the same data from the other nodes (causing data gravitation), this will naturally cause some timeouts since there is contention on a buddy backup subtree.
In general though, we very strongly recommend that you have session affinity if you are using buddy replication. I.e., only perform reads and writes on ONE INSTANCE in the cluster for each key. Data gravitation should really only be used as a form of recovery if a node dies and your reads and writes are now redirected to a standby instance.
See http://wiki.jboss.org/wiki/Wiki.jsp?page=JBossCacheBuddyReplicationDesign.
I guess judging by your access patterns, you need something like Partitioning, which won't be available for at least another 6 months or so - unless you're willing to help out! ;-)
Without better knowledge of your application, I can't really recommend an alternative strategy - do you use a load balancer to distribute requests between caches? Do you use some form of session id per request and is data shared between "sessions"?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117056#4117056
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117056
18 years, 6 months
[JBossCache] - Re: Problem after loading Huge data
by manik.surtani@jboss.com
In terms of limitations, there are no known memory or size limitations within JBoss Cache, as long as your JVM has adequate heap size.
In terms of performance, tree breadth is represented as Maps containing child nodes for each parent node. If each parent node has a large number of children, the Map implementation may become a bottleneck. As of the current stable release (2.0.0.GA) we use java.util.concurrent.ConcurrentHashMaps here. I would say it is worthwhile profiling to see if this does become a bottleneck for you.
In terms of depth, while 20 - 30 levels deep is probably close to the upper level of what I have seen in production use as most folk tend to prefer broader trees to deeper ones. THe limiting factor here is the cost of retrieving a node from the tree (since it walks the tree structure). Deeper trees means more walking. In 2.1.0 we will be optimising this by significantly reducing tree walking (JBCACHE-811). Again though, something I'd recommend profiling first to see how much of an impact it causes with your access patterns.
Finally, regarding your issue of verifying existence, do you have any eviction configured? It could be that an eviction thread is removing nodes from the tree.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117049#4117049
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117049
18 years, 6 months
[Tomcat, HTTPD, Servlets & JSP] - Servlet Redirect filter based on declarative decision graph?
by rainersimon
Hi,
-- Sorry for cross posting this from the jBPM group but it seems to be equally suitable for this group as well - I'm ready to get flamed ;-) --
I'm trying to achieve the following goal, and I don't know how to do it in a clever way yet - i.e. without creating a proprietary solution to a problem that someone else has probably solved (better) already:
I'm planning to build a servlet filter that redirects visitors of the same URL to different documents. The redirect-decision should be made based on a decision graph - similar to a workflow graph - and a bunch of parameters stored in the HttpSession context.
I could just hard-code the decision graph into the servlet filter. But I want to be able to change the graph (i.e. the decision logic) without changing the code of the Filter...
I know this should be possible with jBPM. But since there is no interaction with with databases, Web services, or human actors in the decision logic, it seems that I'm following an overly complicated route to achieve a relatively simple goal.
Is there an easier way to do this? Any comments are welcome. At the moment I don't even know what words to Google for ;-)
Thanks,
Ray
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4117045#4117045
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4117045
18 years, 6 months