[JBoss Seam] - Transaction Timeout / Batch Insert
by toni
Hi,
my webapplication provides a way to import data from a CSV file. If there are too many records so, then the following exception is thrown:
org.hibernate.exception.GenericJDBCException: Cannot open connection
Caused by: org.jboss.util.NestedSQLException: Transaction is not active: tx=TransactionImpl:XidImpl
Because I only get this exception, when there are lots of records to import into the application, I assume that at one point the transaction times out and becomes invalid. The batch insert simply takes to long.
Where can I change/increase the timeout for a batch insert?
Even nicer would be to have a transaction for each record to insert, because the actualy form one unit of work. So having the batch insert within one transaction is actually wrong.
But I'm not sure, how I would do this? Should I use the @Transactional annotation? And which attribute would I have to set on which function?
Any help is being appreciated...
toni
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041122#4041122
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041122
18 years, 12 months
[JBoss Portal] - Loss of Session Attributes
by david.hoffman
Current Software: JBOSS-PORTAL-2.6-CR1-BUNDLED
I am trying to use session attributes for my application coding.
I have three files:
test1.jsp (in webapp1)
| <%=request.getSession().getId()%><br>
| <% request.getSession().setAttribute("test", "SUCCESS"); %>
| <%=request.getSession().getAttribute("test")%>
|
test2.jsp (in webapp1)
| <%=request.getSession().getId()%><br>
| <%=request.getSession().getAttribute("test")%>
|
test3.jsp (in webapp2)
| <%=request.getSession().getId()%><br>
| <%=request.getSession().getAttribute("test")%>
|
When I go to http://localhost:8080/webapp1/test1.jsp the output is:
anonymous wrote :
| B5926EF39194E3584263C60361905C4C
| SUCCESS
|
When I go to http://localhost:8080/webapp1/test2.jsp the output is:
anonymous wrote :
| B5926EF39194E3584263C60361905C4C
| SUCCESS
|
When I go to http://localhost:8080/webapp2/test3.jsp the output is:
anonymous wrote :
| B5926EF39194E3584263C60361905C4C
| null
|
The sessionId remains the same across webapps, but the session variables appear to be valid only within the context in which they are set. The desire is that these values would be available across webapps.
I have seen numerous other forum posts over the past couple years regarding similar problems, however have not found any solutions given to the problem.
Can someone please advise if this is a simple configuration that needs to be made to make session attributes available across webapps on the JBoss App Server that comes bundled with the Jboss Portal 2.6 CR1?
Thank you in advance for your assistance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041121#4041121
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041121
18 years, 12 months
[JBoss Seam] - PDF, max of 14560 rows
by pista666
hi,
i'm only able to print out 14560 row per table in pdf.
Sometimes i get 1row sometimes (and always after jboss restart) 14560.
No exception, No error ... :(
i'm using postgres, report query always retrieves 100 000 rows.
thanks for any idea
stefan
xhtml:
| <table columns="5">
| <cell><paragraph>num</paragraph></cell>
| <cell><paragraph>produkt_id</paragraph></cell>
| <cell><paragraph>type</paragraph></cell>
| <cell><paragraph>name</paragraph></cell>
| <cell><paragraph>comment</paragraph></cell>
|
| <ui:repeat value="#{PrProduktReport.testQuery.resultList}" var="i">
| <cell><paragraph>#{i[0]}</paragraph></cell>
| <cell><paragraph>#{i[1]}</paragraph></cell>
| <cell><paragraph>#{i[2]}</paragraph></cell>
| <cell><paragraph>#{i[3]}</paragraph></cell>
| <cell><paragraph>#{i[4]}</paragraph></cell>
| </ui:repeat>
|
| </table>
|
java:
| @Name("PrProduktReport")
| @Scope(ScopeType.SESSION)
| public class PrProduktReport implements Serializable {
|
| @In
| EntityManager entityManager;
|
| @Logger
| Log log;
|
| public Query testQuery;
|
| public Query getTestQuery(){
| testQuery = entityManager.createNativeQuery("select nextval('seq1'), produkt_id as produkt_id, produkt_typ, nazov, poznamka from pr_produkt limit
| return testQuery;
| }
|
| public void setTestQuery(Query testQuery) {
| this.testQuery = testQuery;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041118#4041118
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041118
18 years, 12 months
[JBoss Portal] - StyleSheet not Working in DisplayTag Library
by lomonaco
Hi,
I'm trying to use a simple example using DisplayTag but the stylesheet is
not working.
Here the Example Live
http://ipplus.dyndns.org:8080/portal/portal/default/DisplayTagPortlet
What I did so far:
The Steps
1) Installed jboss-portal-2.6-CR1-bundled.zip
2) Download displaytag-1.1-bin.zip
3) Copy displaytag-1.1.jar to my WEB-INF/lib Portlet
4) Copy the following Libraries to $JBOSS_HOME/server/default/lib
commons-lang
commons-beanutils
itext
displaytag-export-poi.jar
poi.jar
5) Put displaytag-portlet-1.1.jar inside WEB-INF/lib
6) Create the displaytag.properties file in WEB-INF directory
|
| #sort.behavior=list
| #sort.amount=list
| #basic.empty.showtable=true
| #basic.msg.empty_list=No results matched your criteria.
| #paging.banner.placement=top
| #paging.banner.onepage=<span class="pagelinks"></span>
| export.types=csv excel xml pdf rtf
| export.excel=true
| export.csv=true
| export.xml=true
| export.pdf=true
| export.rtf=true
| export.excel.class=org.displaytag.export.excel.DefaultHssfExportView
| export.pdf.class=org.displaytag.export.DefaultPdfExportView
| export.rtf.class=org.displaytag.export.DefaultRtfExportView
| factory.requestHelper=org.displaytag.util.DefaultRequestHelperFactory
| factory.requestHelper=org.displaytag.portlet.PortletRequestHelperFactory
| # if set, file is downloaded instead of opened in the browser window
| #export.[mymedia].filename=
|
|
7) Create the following JSP Page
| <jsp:directive.page import="org.displaytag.sample.*" />
| <%@ taglib uri="http://displaytag.sf.net" prefix="display" %>
| <%@ taglib uri="http://java.sun.com/portlet" prefix="portlet" %>
|
| <portlet:defineObjects/>
|
| <% request.setAttribute( "test", new TestList(10, false) ); %>
| <display:table name="test"/>
|
|
8) Importing CSS
Copy the ccs directory from the displaytag example to the root of my portlet
9) Change the jboss-portlet.xml file
| <portlet-app>
| <portlet>
| <portlet-name>PortletName</portlet-name>
| <header-content>
| <link type='text/css' rel='stylesheet' href='css/teststyles.css'/>
| <link type='text/css' rel='stylesheet' href='css/site.css'/>
| <link type='text/css' rel='stylesheet' href='css/screen.css'/>
| <link type='text/css' rel='stylesheet' href='css/print.css'/>
| <link type='text/css' rel='stylesheet' href='css/displaytag.css'/>
| <link type='text/css' rel='stylesheet' href='css/alternative.css'/>
| </header-content>
| </portlet>
| </portlet-app>
|
Any Help or tip ?
Thanks in Advanced
Andre Lomonaco
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4041114#4041114
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4041114
18 years, 12 months