[JBoss Portal] New message: "Re: How to clear portlet cache?"
by bharath sadanagiri
User development,
A new message was posted in the thread "How to clear portlet cache?":
http://community.jboss.org/message/527863#527863
Author : bharath sadanagiri
Profile : http://community.jboss.org/people/jayabharath
Message:
--------------------------------------------------------------
Hi,
I got the answer from the following site.
Once ActionResponse.setRenderParameter () is called, parameter will be available between all sub sequent requests.
http://portals.apache.org/pluto/portlet-1.0-apidocs/javax/portlet/ActionR...
This link https://www.ibm.com/developerworks/mydeveloperworks/blogs/Joey_Bernal/ent...
provides a solution. It says instead of setting parameters in renderRequest object in processAction (), set it in session, once used in JSP, remove from session. In this way, you can solve this problem. Move all parameters to session and remove it as soon as you have used in page.
In my case, I moved the navagation key like actionCommand to session and removed in the doView method itself. Please find the piece of code.
in doView() method
============
PortletSession ps = req.getPortletSession();
String actionCommand= (String)ps.getAttribute("actionCommand");
if( ( actionCommand!=null && actionCommand.length()>0 )&& actionCommand.equals("displayCompanyUserReport")){
LOG.debug("Forwarding the request to DisplayCompanyUserReport.jsp for the default functionality");
prd = getPortletContext().getRequestDispatcher("/view/DisplayCompanyUserReport.jsp");
ps.removeAttribute("actionCommand");
LOG.debug("Removed actionCommand from the session");
}
in processAction() method
=================
String actionCommand= req.getParameter("actionCommand");
if( ( actionCommand!=null && actionCommand.length()>0 )&& actionCommand.equals("displayCompanyUserReport")){
res.setRenderParameter("companyId", req.getParameter("companyId"));
res.setRenderParameter("actionCommand", "dummy");
session.setAttribute("actionCommand", "displayCompanyUserReport");
}
Regards,
bharath
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527863#527863
16 years, 2 months
[Beginner's Corner] New message: "[CachedConnectionManager] Closing a connection for you"
by Ismael Fernandez
User development,
A new message was posted in the thread "[CachedConnectionManager] Closing a connection for you":
http://community.jboss.org/message/527861#527861
Author : Ismael Fernandez
Profile : http://community.jboss.org/people/i.fernandezmolina
Message:
--------------------------------------------------------------
Hi, I´m new in with JBoss Seam and I have a problem. I´m trying to call a Store Procedure with a CallableStatement. All the process works well, but when a finish, I have this error:
*[CachedConnectionManager] Closing a connection for you. Please close them yourself: org.jboss.resource.adapter.jdbc.jdk6.WrappedConnectionJDK6@16add0e*
I think it´s due to not close the connection, but I always close them! This is my source code:
*Connection conn = null;
CallableStatement stmt = null;
Session sesion = null;
boolean exito = true;
String msj = null;
int error = 0;
try{
sesion = (Session) em.getDelegate();
conn = sesion.connection();
stmt = conn.prepareCall("{call PCK_SINGLE_SIGN_ON.INSERT_SSO_TRABAJADOR(" + Utilidades.setNumParamsQuery(22) + ")}");
stmt.registerOutParameter(1, OracleTypes.INTEGER);
stmt.registerOutParameter(2, OracleTypes.VARCHAR);
stmt.setString(3, identificador);
stmt.setString(4, nombre);
stmt.setString(5, apellido1);
stmt.setString(6, apellido2);
stmt.setString(7, getNombreCompleto());
stmt.setString(8, nifDni);
stmt.setString(9, Utilidades.getFechaDMA(fNacimiento));
stmt.setString(10, idSsoDepartamento);
stmt.setString(11, keydel);
stmt.setString(12, telefono);
stmt.setString(13, extension);
stmt.setString(14, email);
stmt.setString(15, direccion);
stmt.setString(16, poblacion);
stmt.setString(17, codigoPostal);
stmt.setString(18, telefono2);
stmt.setString(19, idSsoPuesto);
stmt.setInt(20, 0);
stmt.setString(21, identity.getUsername());
stmt.setString(22, usuario);
stmt.execute();
error = stmt.getInt(1);
msj = stmt.getString(2);*
*
*
* stmt.close();*
* conn.close();
}catch(Exception e){
log.info(e.getMessage());
exito = false;
}finally{
log.info(error + " " + msj);
}*
Could this error be a bug? or, is there any solution?
Thank´s
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527861#527861
16 years, 2 months
[JBoss Microcontainer Development] New message: "Re: CallbackItem.changeCallback() very expensive due to context tracking"
by Kabir Khan
User development,
A new message was posted in the thread "CallbackItem.changeCallback() very expensive due to context tracking":
http://community.jboss.org/message/527859#527859
Author : Kabir Khan
Profile : http://community.jboss.org/people/kabir.khan@jboss.com
Message:
--------------------------------------------------------------
> alesj wrote:
> Yeah, I think it you're right.
> Since, if the context/scopeInfo's scope key doesn't include certain scope level,
> looking additioanlly with C doesn't really help -- same result as with B.
> e.g. B's MetaData is just a collection of Cs
I tried in AS and it does not go through to the expensive bit after the first few beans of the bootstrap (probably the ones installed before the context tracker). I've removed that code anyway and committed against https://jira.jboss.org/jira/browse/JBKERNEL-102
> alesj wrote:
>
> For ContextTracker retrieval, this should only be called once, as we should get the CT on the first call.
> (CT is setup in AS -- see kernel.xml, but not by default for MC tests)
>
It looks like the initial call is expensive, but necessary, so my benchmarks are not realistic in this case. I put in some log statements and we do get some multiple calls to scopeInfo.getMetaData() instances but the overhead is low, total of 6ms on AS startup so there is no point in caching.
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527859#527859
16 years, 2 months
[jBPM] New message: "jBPM 4.3 in Tomcat 6 as a webapplication"
by r 0
User development,
A new message was posted in the thread "jBPM 4.3 in Tomcat 6 as a webapplication":
http://community.jboss.org/message/527857#527857
Author : r 0
Profile : http://community.jboss.org/people/rex*05
Message:
--------------------------------------------------------------
Hello,
I have to deploy jBPM 4.3 as a web application, so that I have to deploy only one .war-file.
I don’t want to make chances on the installation of the server like the install scripts do it.
So the server should not be touched.
Now the problem is, that jBPM requires the juel libraries and that tomcat comes with the el-impl library.
I have put the juel libs in my WEB-INF/lib folder. When I try to start tomcat I get the following exception:
Exception sending context initialized event to listener instance of class org.apache.myfaces.webapp.StartupServletContextListener
java.lang.LinkageError: loader constraint violation: when resolving interface method "javax.servlet.jsp.JspApplicationContext.addELResolver(Ljavax/el/ELResolver;)V" the class loader (instance of org/apache/catalina/loader/WebappClassLoader) of the current class, org/apache/myfaces/webapp/Jsp21FacesInitializer, and the class loader (instance of org/apache/catalina/loader/StandardClassLoader) for resolved class, javax/servlet/jsp/JspApplicationContext, have different Class objects for the type javax/el/ELResolver used in the signature
Did anyone have an idea how to solve this problem?
Is there a possibility do disable the classloader of juel or something?
It would be very helpful is anyone could help me!
Greetings
Sandro
--------------------------------------------------------------
To reply to this message visit the message page: http://community.jboss.org/message/527857#527857
16 years, 2 months