[JBossCache] - Concurrency problem
by Kain1981
Hi,
I am using JBoss Cache in a cluster environment.
>From the different PCs within the cluster, the following code is called:
1. get some X from the cache
2. update X (for example, X++)
3. put the updated X back to the cache
4. return X to the client
What I see is when this code is called repeatedly and simultenously from
different PCs, the returned X is sometimes the same as the one on
another PC!
The code is being called from a stateless session bean. Playing with
TransactionAttribute I sometimes got org.jboss.cache.lock.UpgradeException,
sometimes the situation described above.
Here is some of the cache settings:
<attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
| <attribute name="IsolationLevel">SERIALIZABLE</attribute>
| <attribute name="NodeLockingScheme">PESSIMISTIC</attribute>
| <attribute name="CacheMode">REPL_SYNC</attribute>
|
How should I achieve data integrity using TreeCache?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007542#4007542
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007542
19 years, 2 months
[JBossWS] - Re: EJB3 and JBossWS (JAXWS), is WSgen even needed for botto
by dwin
hey BK,
Since you're using JBoss 4.04, I am assuming you're using JBossWS 1.0.x (which is not JAX-WS 2.0 compliant but JAX-RPC 1.x). In fact, there is no binary release of a JAX-WS JBossWS unless you're using JBoss 5.
I had to check out the code (via SVN) for JBoss 4.0.5 and compile it myself to get JBossWS 1.2 (JAX-WS) to work.
Also, I am also assuming you want to do bottom to top (meaning java to WSDL). If that is the case, then you don't need to use wsgen.
all you really need to do in your war file is just package a POJO with @Stateless, @WebService and annotate the specific methods, you want to release as web services, with @WebMethod.
This should work, you can check if your web service is deployed by going to http://<your server>:<http port number>/jbossws/services. ie
http://localhost:8080/jbossws/services
you should see your service on the list along with the pertaining WSDL.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007540#4007540
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007540
19 years, 2 months
[JBossWS] - Re: EJB3 and JBossWS (JAXWS), is WSgen even needed for botto
by dwin
hey BK,
Since you're using JBoss 4.04, I am assuming you're using JBossWS 1.0.x (which is not JAX-WS 2.0 compliant but JAX-RPC 1.x). In fact, there is no binary release of a JAX-WS JBossWS unless you're using JBoss 5.
I had to check out the code (via SVN) for JBoss 4.0.5 and compile it myself to get JBossWS 1.2 (JAX-WS) to work.
Also, I am also assuming you want to do bottom to top (meaning java to WSDL). If that is the case, then you don't need to use wsgen.
all you really need to do in your war file is just package a POJO with @Stateless, @WebService and annotate the specific methods, you want to release as web services, with @WebMethod.
This should work, you can check if your web service is deployed by going to http://<your server>:<http port number>/jbossws/services. ie
http://localhost:8080/jbossws/services
you should see your service on the list along with the pertaining WSDL.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007539#4007539
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007539
19 years, 2 months
[JBoss Seam] - Can't make my themes work
by pdpantages
Hello forum,
seam 1.1.0.GA
jboss-4.0.5.GA
ajax4jsf-1.0.5
Facelets
I am trying to add themes to my seam-app & have been
getting the "Cannot get value for expression
'#{org.jboss.seam.theme.theme}'" exception, caused by an NPE at
ThemeSelector:63
I copied the setup from the 1.1.0.GA blog example.
I.e., In components.xml I have
| <component name="themeSelector">
| <property name="availableThemes">
| <value>default</value>
| <value>ie_default</value>
| </property>
| <property name="cookieEnabled">true</property>
| </component>
|
I put the property files in WEB-INF/classes
In the .war file, the theme files packaged WEB-INF/classes
eg: WEB-INF/classes/default.properties
etc...
These locations match what I see in the blog's war file.
I am not setting the default theme anywhere; I am assuming that the
first one in the component list will become default? I reference the
theme like so on my page:
| <!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"
| xml:lang="en"
| lang="en">
|
| <head>
| <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
| <title>Login</title>
| <link href="#{theme.css}" rel="stylesheet" type="text/css" />
| </head>
|
Exception:
| I have javax.el.ELException: /view/home.xhtml: Cannot get value for expression '#{org.jboss.seam.theme.theme}'
| at com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:53)
| at com.sun.facelets.compiler.UIInstructions.encodeBegin(UIInstructions.java:39)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:232)
| at com.sun.facelets.tag.jsf.ComponentSupport.encodeRecursive(ComponentSupport.java:239)
| at com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:580)
| at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
| at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:222)
| at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
| at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:75)
| at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:213)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| 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.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| 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:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| 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)
| Caused by: javax.faces.el.EvaluationException: Exception getting value of property theme of base of type : org.jboss.seam.Namespace
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:96)
| at org.apache.myfaces.el.ELParserHelper$MyPropertySuffix.evaluate(ELParserHelper.java:532)
| at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:145)
| at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
| at org.jboss.seam.core.Expressions$1.getValue(Expressions.java:51)
| at org.jboss.seam.Component.getInstanceFromFactory(Component.java:1666)
| at org.jboss.seam.Component.getInstance(Component.java:1615)
| at org.jboss.seam.Component.getInstance(Component.java:1592)
| at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java:46)
| at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
| at com.sun.facelets.el.LegacyELContext$LegacyELResolver.getValue(LegacyELContext.java:134)
| at com.sun.el.parser.AstIdentifier.getValue(AstIdentifier.java:65)
| at com.sun.el.parser.AstValue.getValue(AstValue.java:106)
| at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:192)
| at com.sun.facelets.el.ELText$ELTextVariable.toString(ELText.java:174)
| at com.sun.facelets.compiler.AttributeInstruction.write(AttributeInstruction.java:49)
| ... 41 more
| Caused by: java.lang.NullPointerException
| at org.jboss.seam.theme.ThemeSelector.initDefaultTheme(ThemeSelector.java:63)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1791)
| at org.jboss.seam.Component.callCreateMethod(Component.java:1739)
| at org.jboss.seam.Component.newInstance(Component.java:1728)
| at org.jboss.seam.Component.getInstance(Component.java:1625)
| at org.jboss.seam.Component.getInstance(Component.java:1604)
| at org.jboss.seam.Component.getInstance(Component.java:1581)
| at org.jboss.seam.Component.getInstance(Component.java:1576)
| at org.jboss.seam.theme.ThemeSelector.instance(ThemeSelector.java:142)
| at org.jboss.seam.theme.Theme.init(Theme.java:38)
| at org.jboss.seam.theme.Theme.getTheme(Theme.java:104)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.jboss.seam.util.Reflections.invoke(Reflections.java:18)
| at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java:102)
| at org.jboss.seam.Component.callComponentMethod(Component.java:1791)
| at org.jboss.seam.Component.unwrap(Component.java:1817)
| at org.jboss.seam.Component.getInstance(Component.java:1639)
| at org.jboss.seam.Component.getInstance(Component.java:1592)
| at org.jboss.seam.Namespace.get(Namespace.java:42)
| at org.apache.myfaces.el.PropertyResolverImpl.getValue(PropertyResolverImpl.java:78)
| ... 56 more
|
|
Am I missing something obvious?
PdP
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007533#4007533
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007533
19 years, 2 months
[JBoss Seam] - Why must we do ant deploy.tomcat after each change?
by guy_davis
Please forgive this naive question, but is it really required to maintain a separate code workspace and tomcat installation, running ant each time to "deploy" a change. I'm more used to PHP and other CGI scripting approaches where the server picks up the change on the next web request by noticing the file has changed on disk.
In the past, I've accomplished this using Tomcat in embedded mode from a custom Java server app within Eclipse in debug mode. Each change to a .java file was reflected right away on the next request. I also could set breakpoints on the fly.
Am I correct in thinking I need to follow the standards in the Seam examples, where the src and view are held in one spot which are copied over as a war file into Tomcat using Ant? Is there no way to simply drop files into the webapps directory of Tomcat and just work from there?
Thanks in advance,
Guy
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007529#4007529
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007529
19 years, 2 months