[JNDI/Naming/Network] - Re: slow lookup, delay 3 seconds
by haribo
02.09.2008 15:59:43 sun.rmi.transport.tcp.TCPEndpoint
FEIN: main: localHostKnown = true, localHost = 138.33.0.204
02.09.2008 15:59:43 sun.rmi.transport.tcp.TCPTransport
FEIN: main: Version = 2, ep = [138.33.0.204:0]
02.09.2008 15:59:43 sun.rmi.transport.tcp.TCPEndpoint getLocalEndpoint
FEIN: main: created local endpoint for socket factory null on port 0
02.09.2008 15:59:43 sun.rmi.transport.tcp.TCPChannel createConnection
FEIN: main: create connection
02.09.2008 15:59:43 sun.rmi.transport.tcp.TCPEndpoint newSocket
FEINER: main: opening socket to [138.33.5.51:1101]
02.09.2008 15:59:43 sun.rmi.transport.proxy.RMIMasterSocketFactory createSocket
FEIN: main: host: 138.33.5.51, port: 1101
02.09.2008 15:59:46 sun.rmi.transport.tcp.TCPChannel createConnection
FEINER: main: server suggested 138.33.0.204:2297
02.09.2008 15:59:46 sun.rmi.transport.tcp.TCPChannel createConnection
FEINER: main: using 138.33.0.204:0
02.09.2008 15:59:46 sun.rmi.server.UnicastRef logClientCall
FEINER: main: outbound call: [endpoint:[138.33.5.51:1101](remote),objID:[0:0:0, 2]] : sun.rmi.transp
ort.DGCImpl_Stub[0:0:0, 2]: java.rmi.dgc.Lease dirty(java.rmi.server.ObjID[], long, java.rmi.dgc.Lea
se)
02.09.2008 15:59:46 sun.rmi.transport.StreamRemoteCall
FEINER: main: write remote call header...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174221#4174221
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174221
17 years, 8 months
[JNDI/Naming/Network] - slow lookup, delay 3 seconds
by haribo
Hello Everybody,
in our productive enviroment, we running a JBOSS 4.0.5 GA as server and JRE1.6.0.01 as clients. Since a few days, some clients take a long time for the first lookup to an EJB. We find out, that for each node in the cluster we takes down, the first lookup takes 3 seconds fewer.
tcpdump with the last active node:
12:30:09.906709 IP W1OG304570.2051 > JBOSS-05.1099: S 3609508404:3609508404(0) win 64512 <mss 1460,nop,nop,sackOK>
12:30:09.907384 IP JBOSS-05.1099 > W1OG304570.2051: S 1701190293:1701190293(0) ack 3609508405 win 5840 <mss 1460,nop,nop,sackOK>
12:30:09.907432 IP W1OG304570.2051 > JBOSS-05.1099: . ack 1 win 64512
12:30:09.907726 IP JBOSS-05.1099 > W1OG304570.2051: P 1:5(4) ack 1 win 5840
12:30:09.908103 IP JBOSS-05.1784772193 > W1OG304570.2051: 355 proc-1651139939
12:30:09.908262 IP W1OG304570.2051 > JBOSS-05.1099: . ack 361 win 64153
12:30:09.988872 IP W1OG304570.2052 > JBOSS-05.1098: S 1598309292:1598309292(0) win 64512 <mss 1460,nop,nop,sackOK>
12:30:09.989133 IP JBOSS-05.1098 > W1OG304570.2052: S 1706430601:1706430601(0) ack 1598309293 win 5840 <mss 1460,nop,nop,sackOK>
12:30:09.989290 IP W1OG304570.2052 > JBOSS-05.1098: . ack 1 win 64512
12:30:12.985180 IP W1OG304570.2052 > JBOSS-05.1098: P 1:8(7) ack 1 win 64512
12:30:12.985231 IP JBOSS-05.1098 > W1OG304570.2052: . ack 8 win 5840
12:30:12.985501 IP JBOSS-05.1098 > W1OG304570.2052: P 1:20(19) ack 8 win 5840
12:30:12.986998 IP W1OG304570.2052 > JBOSS-05.1098: P 8:26(18) ack 20 win 64493
...
Switching from port 1099 to port 1100 doesn't matter. After the first lookup, it's running fast
Seems to be a client problem, but we test this with identical clients installed by the same image. We also copied the jre-dir from a client without the problem to one with the problem, without any effect.
any clues?
Kind Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174214#4174214
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174214
17 years, 8 months
[JBoss Portal] - Portlet Preferences store() error
by bryancan
I am using jboss portal 2.6.6. I have a struts portlet that works fine, except when I need to use prefs.store() to store preferences... I get:
Caused by: java.lang.IllegalStateException: Store must be called within the scope of an action request
at org.jboss.portal.portlet.impl.jsr168.api.PortletPreferencesImpl.store(PortletPreferencesImpl.java:282)
at com.portlet.data_now.action.ViewAction.execute(ViewAction.java:56)
at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:419)
...
here is the source for the class I get the error from:
| package com.portlet.data_now.action;
|
| import java.io.IOException;
| import java.security.NoSuchAlgorithmException;
|
| import javax.portlet.PortletPreferences;
| import javax.portlet.ReadOnlyException;
| import javax.portlet.RenderRequest;
| import javax.portlet.RenderResponse;
| import javax.portlet.ValidatorException;
| import javax.servlet.http.HttpServletRequest;
| import javax.servlet.http.HttpServletResponse;
|
| import org.apache.struts.action.Action;
| import org.apache.struts.action.ActionForm;
| import org.apache.struts.action.ActionForward;
| import org.apache.struts.action.ActionMapping;
|
| import com.firescope.data_now.FileCreator;
|
| public class ViewAction extends Action {
| public ActionForward execute(ActionMapping mapping, ActionForm form,
| HttpServletRequest req, HttpServletResponse res) {
| RenderRequest pReq = (RenderRequest) req.getAttribute("javax.portlet.request");
| RenderResponse rRes = (RenderResponse) req.getAttribute("javax.portlet.response");
| PortletPreferences pr = (PortletPreferences) pReq.getPreferences();
| String fwd = "portlet.data_now.view";
| String alreadyOK = pr.getValue("verified", "");
| String isOK = null;
| String keytext = req.getParameter("licenseKey");
|
| if ((null != keytext) && (!keytext.equals(""))) {
| FileCreator fc = new FileCreator();
| String success = null;
| try {
| success = fc.makeKeyFile(keytext);
| } catch (IOException e) {
| System.out.println("Error writing key file: "+e);
| }
| }
|
| if ((alreadyOK == null) || (!alreadyOK.equals("1"))) {
| FileReader fr = new FileReader();
| try {
| isOK = fr.getLines(pReq, rRes);
| } catch (NoSuchAlgorithmException e) {
| e.printStackTrace();
| } catch (ReadOnlyException e) {
| e.printStackTrace();
| } catch (ValidatorException e) {
| e.printStackTrace();
| } finally {
| if((null != isOK)&&(isOK.equals("1"))){
| try {
| pr.setValue("verified", "1");
| pr.store();
| return mapping.findForward(fwd);
| } catch (ReadOnlyException e) {
| e.printStackTrace();
| }
| }
| }
| } else {
| isOK = "1";
| }
| if ((null == isOK) || (!isOK.equals("1"))) {
| fwd = "portlet.data_now.license";
| }
| return mapping.findForward(fwd);
| }
| }
|
|
This same code works perfectly in another portal and I am trying to port this to jboss... any help here?
Bryancan
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174205#4174205
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174205
17 years, 8 months
[JBoss Portal] - Accessing Jackrabbit-Repository
by DarthTrader
Hi,
I'm searching for a way to access the Jackrabbit-Repository on JBoss-Portal-Server. In recent coding-examples for the JCR-API and reading the How-To-Articles on the Jackrabbit-Wiki it seems to get a repository instance from JNDI like that:
Context ctx = new InitialContext();
Repository repo = (Repository) ctx.lookup("java:/jcr/local");
Finally thease are my questions:
1) How to access jackrabbit on JBoss-Portal with the JCR API?
2) Do I have to install the RAR and creating the jcr-ds.xml description even if Jackrabbit comes along with the portal from scratch (deployed as SAR with a jboss-service.xml)?
3) What is the correct JNDI-Name to access Jackrabbit?
I'm using JBoss 2.7.0.B1 with JBoss 4.2.3 and MySQL 5.
Thanks in advance
DT
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4174200#4174200
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4174200
17 years, 8 months