Automatically rejected mail
by Mail Delivery Subsystem
Your message was automatically rejected by Dovecot Mail Delivery Agent.
The following reason was given:
Quota exceeded
17 years, 11 months
[JBoss Portal] - database issue
by taocore
I am using my firebird database.
I create desktop.fdb under jboss-portal-2.6.6.GA\server\default\data\desktop, and create desktop-firebird-ds.xml under the deploy directory with the content:
| <datasources>
| <local-tx-datasource>
| <jndi-name>DesktopDS</jndi-name>
| <connection-url>jdbc:firebirdsql:local:${jboss.server.data.dir}${/}desktop${/}desktop.fdb</connection-url>
| <driver-class>org.firebirdsql.jdbc.FBDriver</driver-class>
| <user-name>sysdba</user-name>
| <password><![CDATA[masterkey]]></password>
| </local-tx-datasource>
| </datasources>
|
There is one table called computer_t with one record in desktop.fdb.
I have also placed the jaybird-full-2.1.6.jar under ${jboss_home}/server/default/lib
I changed the HelloWorldPortlet to show something in the database. The code is:
| protected void doView(RenderRequest rRequest, RenderResponse rResponse) throws PortletException, IOException, UnavailableException
| {
| rResponse.setContentType("text/html");
| PrintWriter writer = rResponse.getWriter();
| writer.write("Hello World!\n");
| Connection conn = null;
| try
| {
| DataSource ds = (DataSource) new InitialContext().lookup("java:/DesktopDS");
| System.out.println("1111111111111");
| conn = ds.getConnection();
| System.out.println("222222222222222");
| String sql = "select * from computer_t";
| PreparedStatement s = conn.prepareStatement(sql);
| System.out.println("3333333333333333");
| ResultSet rs = s.executeQuery();
| System.out.println("4444444444444444444");
| while (rs.next())
| {
| System.out.println("55555555555555555555");
| String name = rs.getString(2);
| writer.write(name + "\n");
| }
| } catch (NamingException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| } catch (SQLException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| finally
| {
| if (conn != null)
| {
| try {
| conn.close();
| } catch (SQLException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
| }
| }
| writer.close();
| }
|
After deploying it and navigate the browser to the default page. I found no record shown in the portlet. The debug info was printed on the console 1, 2, 3, 4 but no 5.
After shut down the server, I use isql connect to the desktop.fdb, and found the record inserted before was lost.
It seems that the portal clear my table. Any suggestions?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170903#4170903
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170903
17 years, 11 months
[JBoss Messaging] - Re: Weird transaction error
by TheOverlord
I can confirm that adding <track-connection-by-tx/> to my JMS datasource file fixed the problem.
It should look like this:
| <tx-connection-factory>
| <jndi-name>JmsXA</jndi-name>
| <xa-transaction/>
| <rar-name>jms-ra.rar</rar-name>
|
| <!-- ADD THIS. DONT FORGET IT !!!!!!!!!!!!! -->
| <track-connection-by-tx/>
| <connection-definition>org.jboss.resource.adapter.jms.JmsConnectionFactory</connection-definition>
| <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
| <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/DefaultJMSProvider</config-property>
| <max-pool-size>20</max-pool-size>
| <security-domain-and-application>JmsXARealm</security-domain-and-application>
| </tx-connection-factory>
|
Arghhhhh, I can't believe that this was the cause of all my pain.
How was I supooed to know that some obscure setting was causing all this commit/rollback and IllegalMonitorState exceptions !!
It should be there by default.
OMFG, I lost so much sleep over this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4170894#4170894
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4170894
17 years, 11 months