[Beginners Corner] - save data into jboss tables
by rmundaca
Hello
I'm a completely newbie in jboss developmet and I have a question about portlets:
I want to develop an alternative user form for upload contents (texts and images) into jboss portal. So, I want to save this content in custom tables (outside jboss schema) but I also want to save it in the usual way (using control jboss control version).
Actually I'm able to show a new portlet of content. It show a custom form. The user write some stuff and save it in my tables. But I cannot save into Jboss schema.
Trying to understand the source code, I found an abstract class called PortalJsp (in org.jboss.portal.core.servlet.jsp.PortalJsp). This class define and abstract method called _jspService. I think this method actually contain the logic I need to save data in jboss schema.
the problem? I don't find any source code examples to verify my guesses.
Can somebody help me to find the way to save manually data from my user form into jboss shema?
thanx in advance
Rodrigo
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102683#4102683
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102683
18 years, 7 months
[JBoss Portal] - Re: cms - big file upload problem - mysql
by david.hoffman
OK, I have tried the following configurations, all with the same results.
2.6.1 w/ jdk 1.5
2.6.1 w/ jdk 1.6
2.6.2 w/ jdk 1.5
2.6.2 w/ jdk 1.6
Regardless of the configuration, I still get the same exception:
|
| javax.resource.ResourceException: Transaction is not active:
| tx=TransactionImple < ac, BasicAction:
| a20fcee:92f:4731f6e1:72f status: ActionStatus.ABORT_ONLY >
| at org.jboss.resource.connectionmanager.TxConnectionManager.getManagedConnection(TxConnectionManage
| r.java:304)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2.allocateConnection(BaseConnectionMan
| ager2.java:396)
| at org.jboss.resource.connectionmanager.BaseConnectionManager2$ConnectionManagerProxy.allocateConne
| ction(BaseConnectionManager2.java:842)
| at org.jboss.resource.adapter.jdbc.WrapperDataSource.getConnection(WrapperDataSource.java:88)
| at org.hibernate.connection.DatasourceConnectionProvider.getConnection(DatasourceConnectionProvider
| .java:69)
| at org.hibernate.jdbc.ConnectionManager.openConnection(ConnectionManager.java:423)
|
|
| ...
|
|
| org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
|
| at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| at java.lang.Thread.run(Thread.java:619)
|
|
Looking through the stacktrace, this seems to be some sort of hibernate transaction issue.... Am I reading this right? Is the transaction closing before it is finished?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102681#4102681
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102681
18 years, 7 months
[JBoss Seam] - EntityQuery.resultList contains all nulls after AJAX request
by ASavitsky
This one drives me crazy! If there's a list box backed by an EntityQuery, on the same page with an AJAX component (in my case it's RichFaces DataScroller/DataTable), then after several AJAX requests, the resultList for EntityQuery contains a list of nulls. It looks like every entity in the resultList is replaced with a null. I'm not sure whether it's Seam or RichFaces, but it's bound to be one or the other.
Anyway, here's the setup: Seam 2 GA, RichFaces 3.1.2, Facelets 1.1.14, JSF RI 1.2.05, Hibernate 3.2.5 GA.
The entites A and B are identical in structure (though they can be different, for as much as this bug cares):
@Entity
| public class A implements Serializable {
| @Id
| private String name;
|
| public String getName() {
| return name;
| }
| }
The EntityQuery's:
<core:init debug="false" />
| <core:manager conversation-timeout="120000" concurrent-request-timeout="500" />
| <persistence:entity-manager-factory name="testDatabase" />
| <persistence:managed-persistence-context name="entityManager"
| entity-manager-factory="#{testDatabase}" auto-create="true" />
| <transaction:entity-transaction entity-manager="#{entityManager}" />
| <framework:entity-query name="listOfA" scope="conversation" ejbql="FROM A a" order="name" />
| <framework:entity-query name="listOfB" scope="conversation" ejbql="FROM B b" order="name" />
| <security:identity authenticate-method="#{authenticator.authenticate}" />
| <web:ajax4jsf-filter force-parser="false" enable-cache="true" class="org.ajax4jsf.FastFilter" />
Now, the Facelets page:
<h:form xmlns="http://www.w3.org/1999/xhtml"
| xmlns:h="http://java.sun.com/jsf/html" xmlns:f="http://java.sun.com/jsf/core"
| xmlns:s="http://jboss.com/products/seam/taglib" xmlns:r="http://richfaces.org/rich">
| <r:dataTable id="list" var="a" value="#{listOfA.resultList}" rows="4">
| <r:column>
| <h:commandLink action="Dummy" value="#{a.name}" />
| </r:column>
| </r:dataTable>
| <r:datascroller align="left" maxPages="1" for="list" fastControls="auto" />
| <br />
| <h:selectOneMenu value="#{notImportantHere}">
| <s:selectItems value="#{listOfB.resultList}" var="b" label="#{b.name}" noSelectionLabel="Select one..." />
| <s:convertEntity />
| </h:selectOneMenu>
| </h:form>
Pretty simple - there's a scrollable datatable for entity A, and a dropdown for entity B. Now, when user activates the datascroller twice, and then selects an A from the data table, the list of Bs is empty - it contains the same # of entries as before, but they are all empty.
Has anyone ever encountered such behavior before? Is this a bug? I myself have seen it before, with a different AJAX component (it was a RichFaces suggestion box that time), but dismissed it on the notion that "what else could you expect from a beta" (Seam was B2 at the time)?
Thanks in advance,
Alex
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4102676#4102676
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4102676
18 years, 7 months