[JBoss Portal] - Re: Questions about database connections between portlets
by ebrennanï¼ hotmail.com
This might be just one of those "Any comments" as I am still learning this stuff also.
A couple things about database connections.
1. JBoss AS and Portal uses Hibernate for there connections and it looks like this technology is making good progress in the development world. Hibernate and other similar technologies (toplink) do the db connections for you. They set these connections into a pool and hand them out to the portlet as needed. Once the request is finished, it is returned to the pool. You should be closing the connection as soon load the data (a few milliseconds).
2. I don't know how customized each users portal will be but you can increase efficiency by caching the data. You should be using enity beans to load the items from the database. It you make the bean global you should able to share it across multiple users.
Hope this puts you in the right direction.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092533#4092533
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092533
18Â years, 8Â months
[JBossWS] - Client side memory leak?
by m0hmad
Hello,
I've got EJBs that operates in proxy mode. They just pass thru requests parameters to JBossWS Client implementation and redirect responses back.
All WS artifacts, service and endpoints have been generated with wsconsume tool. Soap endpoints are exposed like:
public class SoapServicesFactory {
|
| static private Content contentSoap; // the SOAP client
|
| static public synchronized ContentSoap getContentSoap() {
| if (null == contentSoap)
| contentSoap = new Content();
| return contentSoap.getContentSoap();
| }
| }
The endpoint released right after first remote method invoked, no storing or caching etc being performed.
The problem is, ALL artifacts retrieved from WSs as responses will never released by Garbage Collector and sooner or later there Java heap Space criticall error will be.
Utilizing profiler I can see that artifacts retained by instances of several classes:
- org.jboss.ws.core.soap.ObjectContent
- org.jboss.ws.coreEndpointInvocation
- java.lang.Object
Changing endpoint exposing to:
return (new MobileContent()).getMobileContentSoap();
removes the memory leakage but the service works too slowly cos instantiation of Soap Service is too expensive procedure.
Can anybody help me with this issue?
Looking forward for any response.
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092530#4092530
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092530
18Â years, 8Â months
[JBoss Seam] - Re: s:decorate changed to use DIV instead of SPAN
by damianharvey
Sorry but it does. Look at the pagesource.
>From UIDecorate.java under Seam 1.3:
| @Override
| public void encodeBegin(FacesContext context) throws IOException
| {
| super.encodeBegin(context);
|
| Contexts.getEventContext().set("invalid", hasMessage(this, context));
| Contexts.getEventContext().set("required", hasRequired(this, context));
|
| context.getResponseWriter().startElement("span", this);
| context.getResponseWriter().writeAttribute("id", getClientId(context), "id");
|
And then in DecorateRendererBase (split out from UIDecorate) from Seam 2.0:
|
| @Override
| protected void doEncodeBegin(ResponseWriter writer, FacesContext context, UIComponent component) throws IOException
| {
| UIDecorate decorate = (UIDecorate) component;
|
| Contexts.getEventContext().set("invalid", Decoration.hasMessage(decorate, context));
| Contexts.getEventContext().set("required", Decoration.hasRequired(component, context));
|
| boolean hasMessage = decorate.hasMessage();
|
| writer.startElement("div", decorate);
| writer.writeAttribute("id", decorate.getClientId(context), "id");
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4092527#4092527
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4092527
18Â years, 8Â months