[JBoss Seam] - :( the huge log file.
by gringalet
i am adding the fileupload function in seam example dvd store, now when i click the upload button, my pc will be so busy that it dosn;t have any response from my keybaord , and jboss log file will become bigger more and more. at finally, the log file will be more than 1G size.
who can give me a hand?
my components.xml
<?xml version="1.0" encoding="UTF-8"?>
| <components xmlns="http://jboss.com/products/seam/components"
| xmlns:core="http://jboss.com/products/seam/core"
| xmlns:bpm="http://jboss.com/products/seam/bpm"
| xmlns:persistence="http://jboss.com/products/seam/persistence"
| xmlns:security="http://jboss.com/products/seam/security"
| xmlns:framework="http://jboss.com/products/seam/framework"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation=
| "http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
| http://jboss.com/products/seam/bpm http://jboss.com/products/seam/bpm-2.0.xsd
| http://jboss.com/products/seam/persistence http://jboss.com/products/seam/persistence-2.0.xsd
| http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd
| http://jboss.com/products/seam/framework http://jboss.com/products/seam/framework-2.0.xsd
| http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd">
|
| <core:init debug="true" jndi-pattern="@jndiPattern@"/>
|
| <!-- 120 second conversation timeout -->
| <core:manager conversation-timeout="120000"/>
|
| <bpm:jbpm>
| <bpm:process-definitions>
| <value>ordermanagement1.jpdl.xml</value>
| </bpm:process-definitions>
| <bpm:pageflow-definitions>
| <value>checkout.jpdl.xml</value>
| <value>newuser.jpdl.xml</value>
| </bpm:pageflow-definitions>
| </bpm:jbpm>
|
| <security:identity authenticate-method="#{authenticator.authenticate}"/>
|
| <persistence:managed-persistence-context name="entityManager"
| auto-create="true"
| persistence-unit-jndi-name="java:/dvdEntityManagerFactory" />
|
| <factory name="order"
| value="#{orderHome.instance}"
| scope="stateless"
| auto-create="true"/>
| <framework:entity-home name="orderHome"
| entity-class="com.jboss.dvd.seam.Order"
| scope="conversation"
| auto-create="true">
| <framework:id>#{orderId}</framework:id>
| </framework:entity-home>
|
|
| <framework:entity-query name="allCategories"
| ejbql="select c from Category c"
| order="c.name">
| <!-- waiting for hibernate issue EJB-277
| <framework:hints>
| <key>org.hibernate.cacheable</key>
| <value>true</value>
| </framework:hints>
| -->
| </framework:entity-query>
|
|
| <factory name="topProducts"
| value="#{topQuery.resultList}" />
| <framework:entity-query name="topQuery"
| ejbql="select p from Product p"
| order="p.inventory.sales desc"
| max-results="8" />
| <component class="org.jboss.seam.web.MultipartFilter">
| <property name="createTempFiles">false</property>
| <property name="maxRequestSize">100000000</property>
| </component>
|
| </components>
|
my web.xml
<?xml version="1.0" ?>
|
| <web-app version="2.5"
| xmlns="http://java.sun.com/xml/ns/javaee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
|
| <listener>
| <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
| </listener>
|
| <context-param>
| <param-name>facelets.DEVELOPMENT</param-name>
| <param-value>true</param-value>
| </context-param>
|
| <context-param>
| <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
| <param-value>.xhtml</param-value>
| </context-param>
|
| <filter>
| <filter-name>Seam Filter</filter-name>
| <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
| </filter>
|
| <filter-mapping>
| <filter-name>Seam Filter</filter-name>
| <url-pattern>/*</url-pattern>
| </filter-mapping>
|
| <servlet>
| <servlet-name>Faces Servlet</servlet-name>
| <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
| <load-on-startup>1</load-on-startup>
| </servlet>
|
| <servlet-mapping>
| <servlet-name>Faces Servlet</servlet-name>
| <url-pattern>*.seam</url-pattern>
| </servlet-mapping>
|
| <security-constraint>
| <display-name>Restrict XHTML Documents</display-name>
| <web-resource-collection>
| <web-resource-name>XHTML</web-resource-name>
| <url-pattern>*.xhtml</url-pattern>
| </web-resource-collection>
| <auth-constraint>
| <role-name>NONE</role-name>
| </auth-constraint>
| </security-constraint>
|
| <session-config>
| <session-timeout>10</session-timeout>
| </session-config>
|
| </web-app>
|
File.java
|
| /*
| * JBoss, Home of Professional Open Source
| *
| * Distributable under LGPL license.
| * See terms of license at gnu.org.
| */
| package com.jboss.dvd.seam;
|
| public interface File {
| public boolean isManaged() ;
| public String getFilename() ;
| public void setFilename(String filename);
| public String getContentType();
| public void setContentType(String contentType);
| public byte[] getFiledata() ;
| public void setFiledata(byte[] filedata);
| public void update2();
| public void destroy();
| }
|
my FileAction.java
| package com.jboss.dvd.seam;
|
| import static javax.faces.application.FacesMessage.SEVERITY_WARN;
|
| import javax.ejb.Remove;
| import javax.swing.ImageIcon;
|
| import org.jboss.seam.annotations.*;
| import org.jboss.seam.ScopeType;
|
| import java.io.Serializable;
| import java.util.Map;
|
| @Name("file")
| @Scope(ScopeType.CONVERSATION)
| public class FileAction
| implements File,
| Serializable
| {
|
| public static final int PREVIEW_SIZE_MIN = 240;
|
| public static final int PREVIEW_SIZE_MAX = 1600;
|
| public static final int PREVIEW_ZOOM_STEP = 240;
|
| /* -------------------------- Context Wiring ------------------------------ */
|
| /* -------------------------- Internal State ------------------------------ */
|
| private String filename;
|
| private String contentType;
|
| // TODO: This should really use an InputStream and directly stream into the
| // BLOB without consuming server memory
| private byte[] filedata;
|
| private int imagePreviewSize = 240;
|
| public boolean isManaged() {
| return true;
| }
|
| public String getFilename() {
| return filename;
| }
|
| public void setFilename(String filename) {
| this.filename = filename;
| }
|
| public String getContentType() {
| return contentType;
| }
|
| public void setContentType(String contentType) {
| this.contentType = contentType;
| }
|
| public byte[] getFiledata() {
| return filedata;
| }
|
| public void setFiledata(byte[] filedata) {
| this.filedata = filedata;
| }
|
|
| public void update2(){
| if(getFiledata()!=null){
| System.out.println(getFiledata().length);
| System.out.println(getFilename());
| byte[] filedata=null;
| setFiledata(filedata);
| }
| else
| System.out.println("can't find file uploaded");
| }
| @Remove
| public void destroy() {};
|
| }
|
my fileEdit.xhtml
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
| "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
| <html xmlns="http://www.w3.org/1999/xhtml"
| xmlns:ui="http://java.sun.com/jsf/facelets"
| xmlns:s="http://jboss.com/products/seam/taglib"
| xmlns:f="http://java.sun.com/jsf/core"
| xmlns:h="http://java.sun.com/jsf/html">
| <body>
| <h:outputText value="i am your friend" />
| <h:outputText value="#{file.contentType}" />
| <h:form enctype="multipart/form-data">
| <s:fileUpload id="upload" data="#{file.filedata}" contentType="#{file.contentType}" fileName="#{file.filename}"/>
| <h:commandLink id="update" action="#{file.update2}"
| rendered="#{file.managed}"
| tabindex="6" accesskey="U" styleClass="button"><span class="buttonLabel"><u>U</u>pdate</span></h:commandLink>
|
| </h:form>
|
| </body>
| </html>
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126592#4126592
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126592
18 years, 2 months
[JBoss jBPM] - handling bulk amounts of processinstances; transaction probl
by macd
Can anybody give some advice?
I am trying to figure out if and how jBPM can handle large amounts of processinstances at once.
The scenario is this: a collection of domain-objects (possible 100.000) has to be processed.
All elements may need the same update, but it may also be possible to deal with each element individually;
The 1st approach i tried was to create 100.000 processinstances individually. This costs lots of time: almost 4 hours, which is not acceptible.
So i tried some different approaches:
1. use batches when closing a jbpmContext to create and signall instances
2. let a process create 10.000 subprocesses (foreachfork)
3. use foreachfork for each element of the collection
4. tried those last 2 with an asynchronous processstep
This last method ensured that each fork was scheduled as a job
One problem occurred every time: when upsizing the collection from 100 to 10.000 instances, forks or subprocesses, i recieve an errormessage concerning a transaction:
- transaction not active, cannot open connection
- transaction closed, cannot commit
i searched the forums an found that this is probably caused by a transaction-timeout, which you happily can change.
http://wiki.jboss.org/wiki/Wiki.jsp?page=TransactionTimeout
i think this essentially doesn't fix my problems, cause i can't be upsizing my timeout to eternity. Besides it puzzles me that even the job-executor gets these exceptions.
So my guess is that i should change the config. I know there are some options left, but i don't know what is wise. Can anybody give me some advice?
thanx, Marc
my current config
JBOSS 4.2.2 GA
JBPM 3.2.2
Oracle 9
<jbpm-context>
| <service name="persistence">
| <factory>
| <bean class="org.jbpm.persistence.db.DbPersistenceServiceFactory">
| <field name="isTransactionEnabled"><false /></field>
| <field name="isCurrentSessionEnabled"><true /></field>
| </bean>
| </factory>
| </service>
| <service name="tx" factory="org.jbpm.tx.TxServiceFactory" />
| <service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
| <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
| <!--service name="logging" factory="org.jbpm.logging.db.DbLoggingServiceFactory" /-->
| <service name="authentication" factory="org.jbpm.security.authentication.DefaultAuthenticationServiceFactory" />
|
| ...
|
| <bean name="jbpm.job.executor" class="org.jbpm.job.executor.JobExecutor">
| <field name="jbpmConfiguration"><ref bean="jbpmConfiguration" /></field>
| <field name="name"><string value="JbpmJobExector" /></field>
| <field name="nbrOfThreads"><int value="50" /></field>
| <field name="idleInterval"><int value="5000" /></field>
| <field name="maxIdleInterval"><int value="3600000" /></field> <!-- 1 hour -->
| <field name="historyMaxSize"><int value="20" /></field>
| <field name="maxLockTime"><int value="600000" /></field> <!-- 10 minutes -->
| <field name="lockMonitorInterval"><int value="60000" /></field> <!-- 1 minute -->
| <field name="lockBufferTime"><int value="5000" /></field> <!-- 5 seconds -->
| </bean>
|
|
| </jbpm-context>
|
| <hibernate-configuration>
| <session-factory>
| <property name="hibernate.session_factory_name">JbpmHibernateSessionFactory</property>
| <property name="hibernate.connection.autocommit">false</property>
| <property name="hibernate.jndi.class">org.jnp.interfaces.NamingContextFactory</property>
| <property name="hibernate.dialect">org.hibernate.dialect.Oracle9iDialect</property>
| <property name="hibernate.show_sql">false</property>
| <property name="hibernate.format_sql">false</property>
| <property name="hibernate.use_sql_comments">false</property>
| <property name="hibernate.cache.provider_class">org.hibernate.cache.HashtableCacheProvider</property> <!-- org.hibernate.cache.EhCacheProvider -->
| <property name="hibernate.connection.datasource">java:/JbpmDS</property>
| <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
| <property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.JBossTransactionManagerLookup</property>
| <property name="jta.UserTransaction">java:comp/UserTransaction</property>
| ...
| ...
| </hibernate-configuration>
|
|
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126589#4126589
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126589
18 years, 2 months
[JBoss Tools (users)] - Re: Using Seam 2.0.1.CR1 with JBoss Tools 2.0.0.GA
by Antoine Sabot-Durand
I've got a light issue migrating from seam 2.0.0 to 2.0.1 in JBDS (It should be the same with Jboss Tools)
My project is an EJB3 project targeting JBoss 4.2.2, when I replace jboss-seam.jar in the EAR project with version 2.0.1 I cannot open the "J2EE dependencies" panel in the EJB or War project properties. Here is my workspace log :
| !ENTRY org.eclipse.wst.validation 4 0 2008-02-05 16:23:35.639
| !MESSAGE
| *** ERROR ***: Tue Feb 05 16:23:35 CET 2008 No IModelProvider exists for virtual component P/Zanzibar-ear Zanzibar-ear/EarContent/jboss-seam.jar of version: null
|
| !ENTRY org.eclipse.jface 4 2 2008-02-05 16:23:35.641
| !MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.jface".
| !STACK 0
| java.lang.NullPointerException
| at org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection.initializeElements(ClassPathSelection.java:544)
| at org.eclipse.jst.j2ee.application.internal.operations.ClassPathSelection.<init>(ClassPathSelection.java:142)
| at org.eclipse.jst.j2ee.internal.common.ClasspathModel.createClassPathSelection(ClasspathModel.java:260)
| at org.eclipse.jst.j2ee.internal.common.ClasspathModel.initializeSelection(ClasspathModel.java:244)
| at org.eclipse.jst.j2ee.internal.common.ClasspathModel.getClassPathSelection(ClasspathModel.java:286)
| at org.eclipse.jst.j2ee.internal.ClasspathTableManager.initializeEJBClientDefaults(ClasspathTableManager.java:110)
| at org.eclipse.jst.j2ee.internal.ClasspathTableManager.createRadioGroup(ClasspathTableManager.java:167)
| at org.eclipse.jst.j2ee.internal.ClasspathTableManager.fillComposite(ClasspathTableManager.java:94)
| at org.eclipse.jst.j2ee.internal.JARDependencyPropertiesPage.createTableComposite(JARDependencyPropertiesPage.java:415)
| at org.eclipse.jst.j2ee.internal.JARDependencyPropertiesPage.createListGroup(JARDependencyPropertiesPage.java:372)
| at org.eclipse.jst.j2ee.internal.JARDependencyPropertiesPage.createContents(JARDependencyPropertiesPage.java:282)
| at org.eclipse.jst.j2ee.internal.J2EEDependenciesPage.createNonEARContent(J2EEDependenciesPage.java:138)
| at org.eclipse.jst.j2ee.internal.J2EEDependenciesPage.createContents(J2EEDependenciesPage.java:75)
| at org.eclipse.jface.preference.PreferencePage.createControl(PreferencePage.java:233)
| at org.eclipse.jface.preference.PreferenceDialog.createPageControl(PreferenceDialog.java:1456)
| at org.eclipse.jface.preference.PreferenceDialog$13.run(PreferenceDialog.java:1213)
| at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
| at org.eclipse.core.runtime.Platform.run(Platform.java:857)
| at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
| at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
| at org.eclipse.jface.preference.PreferenceDialog.showPage(PreferenceDialog.java:1207)
| at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.showPage(FilteredPreferenceDialog.java:433)
| at org.eclipse.jface.preference.PreferenceDialog$9.selectionChanged(PreferenceDialog.java:698)
| at org.eclipse.jface.viewers.StructuredViewer$3.run(StructuredViewer.java:842)
| at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
| at org.eclipse.core.runtime.Platform.run(Platform.java:857)
| at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:46)
| at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:199)
| at org.eclipse.jface.viewers.StructuredViewer.firePostSelectionChanged(StructuredViewer.java:840)
| at org.eclipse.jface.viewers.StructuredViewer.setSelection(StructuredViewer.java:1642)
| at org.eclipse.jface.viewers.TreeViewer.setSelection(TreeViewer.java:1095)
| at org.eclipse.jface.preference.PreferenceDialog.selectSavedItem(PreferenceDialog.java:1009)
| at org.eclipse.ui.internal.dialogs.FilteredPreferenceDialog.selectSavedItem(FilteredPreferenceDialog.java:476)
| at org.eclipse.jface.preference.PreferenceDialog$4.run(PreferenceDialog.java:369)
| at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
| at org.eclipse.jface.preference.PreferenceDialog.createContents(PreferenceDialog.java:365)
| at org.eclipse.jface.window.Window.create(Window.java:426)
| at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1081)
| at org.eclipse.ui.internal.dialogs.PropertyDialog.createDialogOn(PropertyDialog.java:81)
| at org.eclipse.ui.dialogs.PropertyDialogAction.createDialog(PropertyDialogAction.java:175)
| at org.eclipse.ui.dialogs.PropertyDialogAction.run(PropertyDialogAction.java:154)
| at org.eclipse.jface.action.Action.runWithEvent(Action.java:498)
| at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
| at org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
| at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
| at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
| at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
| at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
| at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
| at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
| at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
| at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
| at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
| at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
| at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
| at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
| at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
| at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
| at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
| at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
| at java.lang.reflect.Method.invoke(Unknown Source)
| at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:508)
| at org.eclipse.equinox.launcher.Main.basicRun(Main.java:447)
| at org.eclipse.equinox.launcher.Main.run(Main.java:1173)
|
reverting to version 2.0.0 jar correct the problem. Eclipse seems to look for something in the jar that it doesn't find. However the project can be deployed and run with 2.0.1 jar the only trouble is that we can't edit J2EE dependencies anymore
regards
Antoine
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126586#4126586
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126586
18 years, 2 months