[JCA/JBoss] - Re: shouldn't local-tx-datasource have auto-commit = false?
by jhudson
Sorry, I should have provided that information before... thanks very much for the reply.
I'm using hibernate 3.1.3 and jboss-4.0.5 with mysql 5.0.11 and the latest connector
| I have a HAR which puts the session factory in the JNDI context
| <server>
| <mbean code="org.jboss.hibernate.jmx.Hibernate" name="jboss.har:service=Hibernate">
| <depends>jboss.jca:service=DataSourceBinding,name=jdbc/MyAdBox</depends>
|
| <attribute name="DatasourceName">java:/jdbc/MyAdBox</attribute>
| <attribute name="SessionFactoryName">java:/hibernate/MyAdBoxHibernateFactory2</attribute>
| <attribute name="CacheProviderClass">org.hibernate.cache.OSCacheProvider</attribute>
| <attribute name="Dialect">org.hibernate.dialect.MySQLDialect</attribute>
| <attribute name="QueryCacheEnabled">true</attribute>
| <attribute name="ShowSqlEnabled">false</attribute>
| </mbean>
| </server>
And, this is how I would handle a transaction...
Session s = null;
| Transaction t = null;
| try {
| s = getSession();
| t = s.beginTransaction()
|
| // transactional code here
|
| t.commit();
| }
| catch (Throwable throwable) {
| if (null != t) t.rollback();
| }
| finally {
| if (null != s) s.close();
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001546#4001546
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001546
19 years, 3 months
[JBoss Seam] - "page parameters" trouble
by g.tomassoni
Dears,
I'm trying to use the "page parameters" feature in seam, but I see that defining whatever kind of action (through < h:commandButton/ > in example) in a page yields erratic behaviour when parameters are switched from outside the app itself (in example, from a < a href="..." / > from another page).
The problem is easily shown in "framed" pages. In my case, I have a left frame which is meant to "navigate" the content of the right frame. Loading through the left frame a right page with different parameters with respect to the shown one, the GET with the new parameters is correctly issued by the browser, but the parameters that Seam sets to the new page are the old ones.
I'm experiencing this problem with both jboss-seam-1.1.0.GA and jboss-seam-CVS-20070111.
I looked for a solution to this problem both in Seam's Jira and in this forum, but didn't find any. Is there any way to circumvent the problem?
Also, if mine is the first report of such a problem, I can supply a testcase in Jira.
Regards,
Giampaolo Tomassoni
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001544#4001544
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001544
19 years, 3 months
[JBoss jBPM] - processdefinition.xml error
by Andrea_Italy
Hi,
I'm trying to deploy the jbpm-bpel-1.1.Beta2 Hello example, but when I execute the ant deploy-definition command, the server shell report this exception:
| ERROR [[processDeployServlet]] Servlet.service() for servlet processDeployServlet threw exception
| org.jbpm.jpdl.JpdlException: [[ERROR] no processdefinition.xml inside process archive]
| at org.jbpm.jpdl.par.JpdlArchiveParser.readFromArchive(JpdlArchiveParser.java:43)
| at org.jbpm.jpdl.par.ProcessArchive.parseProcessDefinition(ProcessArchive.java:81)
| at org.jbpm.bpel.web.ProcessDeployServlet.doGet(ProcessDeployServlet.java:50)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
I'm developing with Linux and jbpm-starters-kit-3.1.2
How can I solve this?
Someone help me please...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001519#4001519
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001519
19 years, 3 months
[EJB 3.0] - mapping example onetoMany
by trashhash
Dose any one got an easy example for mapping tables/objects? This is what Im manage to do so far.
|
| public class Team (...)
| @OneToMany(mappedBy="team")
| private List teamList;
|
| public class User (...)
|
| @ManyToOne
| @JoinColumn(name="team_id",referencedColumnName="id")
| protected User user;
|
|
referencedColumnName="id" id column for table user.
name = id column for table team.
All im getting is
| javax.persistence.PersistenceException: org.hibernate.MappingException: Could not determine type for: java.util.List, for columns: [org.hibernate.mapping.Column(user)]
|
Its strange that Column contains the class name?
Do I need to add something to persistence.xml?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4001518#4001518
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4001518
19 years, 3 months