[JBossCache] - Transactions
by aditsu
Let's say I have a machine running a jboss cache (C) and another one running an application (A). A conencts to C through some kind of custom API. How can I make it so that A can call multiple API methods within a single transaction in C?
E.g. this could be a scenario:
- A starts a transaction
- A calls a method that modifies a cache node in C
- A calls a method that modifies another node in C
- A tries to commit the transaction
- the first node can be modified successfully, but the second one throws an exception
- C rolls back the whole transaction because the second node change failed
If I only rely on transactions in C, then either the first method has to start a transaction, or A needs to call another API method first that starts a transaction. How would the second method "know" it is part of the same transaction, and how can A then commit the same transaction? Are transactions associated with threads in machine C? Does that mean the whole sequence of API calls has to be executed on the same dedicated thread in C? Or is it possible to send the transaction reference across the API? Will there be conflicts if multiple threads in A are doing this at the same time?
Or, is it possible to use a distributed transaction manager to solve this problem? How would that work, and how would the code in A and the code in C know they're part of the same transaction?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062834#4062834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062834
18Â years, 11Â months
[JBoss Portal] - Curious Bug in 2.6 GA - Adding window properties
by nystaa
Using 2.6 GA bundled.
When trying to add a window property of some window some where with the key name starting with letters a-s (upper or lower) you get an exception:
Cause: javax.portlet.PortletException: Expected submitted value of type Boolean for Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsf/editProperties.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id55jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlSelectBooleanCheckbox,Id: _id111jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj]}
| Message: Expected submitted value of type Boolean for Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsf/editProperties.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id55jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlSelectBooleanCheckbox,Id: _id111jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj]}
| StackTrace:
|
| javax.portlet.PortletException: Expected submitted value of type Boolean for Component : {Component-Path : [Class: javax.faces.component.UIViewRoot,ViewId: /WEB-INF/jsf/editProperties.xhtml][Class: javax.faces.component.html.HtmlForm,Id: _id55jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj][Class: javax.faces.component.html.HtmlSelectBooleanCheckbox,Id: _id111jbpns_2fadmin_2fdefault_2fAdminPortletWindowsnpbj]}
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.handleExceptionFromLifecycle(MyFacesGenericPortlet.java:253)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.facesRender(MyFacesGenericPortlet.java:399)
| at org.apache.myfaces.portlet.MyFacesGenericPortlet.doView(MyFacesGenericPortlet.java:265)
| at javax.portlet.GenericPortlet.doDispatch(GenericPortlet.java:133)
| at javax.portlet.GenericPortlet.render(GenericPortlet.java:306)
| at org.jboss.portal.faces.portlet.JSFMetaBridgePortlet.render(JSFMetaBridgePortlet.java:125)
| ......
This does not happen with properties that the key starts with letters t-z.
looks like it is somehow linked to the alphabetical position of the added key in relation to already existing window properties "Partial refresh" and "Region order". The key names that produced the exception are located before these properties in the list and the ones that did not generate the exception are located after these native properties.
Can someone confirm this?
Maybe I`m hallucinating...
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062833#4062833
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062833
18Â years, 11Â months
[JBoss Seam] - Re: Out of Memory Leaks
by alexeinov
"holtak" wrote : we also had PermGen problems
|
| Can confirm that JRocket helps with PermGen problems.
|
| You could try SUN JVM 1.6.0 update1 - it suspiciously works here untill now but maybe the server wasn`t just stressed enough and there seams to be no significant change in the SUN changelog regarding this issue...
|
|
We also tried JRocket and are using it now in development and testing environment. It really solves the PermGen issue because there is no separate Permanent Generation of a garbage collectable memory in JRockit JVM, but it does not solve memory leaks that exist in somewhere in container or application code. Memory still leaks, the allocated heap grows, and after all, OutOfMemory condition still occures, though the system survives many more hot deploy cycles.
The ultimate solution to the problem would be an application and an application container that do not leak memory. The problem is there, not in the Java VM, or the memory configuration parameters. The system is leaking - it will crash sooner or later no matter what JVM or how much memory is configured.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062831#4062831
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062831
18Â years, 11Â months
[Beginners Corner] - SQLGrammarException after deploy
by uygarmetu
Hi guys,
I am developing a small enterprise application using EJB3.0 and JSF, and I plan to use JBoss as my AS. I use Oracle's JDeveloper as my IDE at the moment and my DB is Oracle DB. When deploying my application with JDev's embedded OC4J AS, everything works fine, there is not any problem.
I tried to pack and deploy my application to JBoss but faced with problems. First, I got the "$ProxyXX ClassCastException" when looking up remote stateless EJBs from JNDI. I solved this problem by changing "CallByValue" sections to "true" in the "jboss-service.xml" and "ear-deployer.xml" configurations.
Now I do not get that ClassCastExceptionError but this time I get an SQL Error from Oracle which I suppose stems from JBoss's naming the remote entity beans such as "ENTITYBEAN0_"."PROPERTY". In my case the exception is like this one:
"10:04:32,096 WARN [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
10:04:32,096 ERROR [JDBCExceptionReporter] ORA-00904: "MYENTITY0_"."TYPE": invalid identifier
10:04:32,189 ERROR [STDERR] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query..."
I do not know why there is a 0 (zero) at the end of the entity name "MYENTITY", and I suspect this exception is related to that.
I would be very pleased if you can give your opinions on this problem...
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062828#4062828
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062828
18Â years, 11Â months
[Installation, Configuration & DEPLOYMENT] - SQLGrammarException after deploy
by uygarmetu
Hi guys,
I am developing a small enterprise application using EJB3.0 and JSF, and I plan to use JBoss as my AS. I use Oracle's JDeveloper as my IDE at the moment and my DB is Oracle DB. When deploying my application with JDev's embedded OC4J AS, everything works fine, there is not any problem.
I tried to pack and deploy my application to JBoss but faced with problems. First, I got the "$ProxyXX ClassCastException" when looking up remote stateless EJBs from JNDI. I solved this problem by changing "CallByValue" sections to "true" in the "jboss-service.xml" and "ear-deployer.xml" configurations.
Now I do not get that ClassCastExceptionError but this time I get an SQL Error from Oracle which I suppose stems from JBoss's naming the remote entity beans such as "ENTITYBEAN0_"."PROPERTY". In my case the exception is like this one:
"10:04:32,096 WARN [JDBCExceptionReporter] SQL Error: 904, SQLState: 42000
10:04:32,096 ERROR [JDBCExceptionReporter] ORA-00904: "MYENTITY0_"."TYPE": invalid identifier
10:04:32,189 ERROR [STDERR] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.exception.SQLGrammarException: could not execute query..."
I do not know why there is a 0 (zero) at the end of the entity name "MYENTITY", and I suspect this exception is related to that.
I would be very pleased if you can give your opinions on this problem...
Thank you.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4062822#4062822
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4062822
18Â years, 11Â months