[JBoss Seam] - Re: MC/Seam integration and unification
by gavin.king@jboss.com
1) I'm really not sure if there is enough value of this, it just makes things more complex by providing *yet another* deployment option to support and test, and one that is much less portable than the others. Deployment is already way too complex for users, and this does not make it simpler, AFAICT.
2) Definitely won't work. The component models are totally different.
3) Again, I don't see much synergy here.
* rich IoC - components.xml already has lists, maps, references, and its easier to use than MC
* dependency mgmt as you are describing is not useful for us, I don't think ... for us, "dependency" is more a way to avoid ClassCastExceptions ;-)
I long ago investigated basing this stuff on MC, but it turned out to not be doable. Two totally different problems, even if they look superficially similar. Same reason Seam isn't based on Spring or Pico or anything else.
What we might want to do, however, is provide an MC integration layer (similar to the integration layer we are doing from Spring), where an MC component can be a Seam component at the same time. I have not thought this through, however.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008955#4008955
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008955
17 years, 11 months
[JBossCache] - Re: Configuration problems For PojoCache under JBoss AS
by Naxo
Hello again,
I really don?t know how to aspectize the objects I want to cache. As I said in my first post, all the examples that I have found are standalone. I want to use it in the Jboss AS, so I am having problems to understand exactly what to do. Please remember that I am newbie in Jboss and JbossCache. I have read all the documentation, and examples and I am quite lost right now, so I hope you can help me.
According to the documentation, there are two steps needed to instrument or aspectize the POJOs via JBossAop:
1. Prepare POJO. Via annotation or xml declaration. For annotation either JDK 1.4 or JDK 5.0.
2. Instrumentation. Instrument the POJO either at compile-time or load-time. Compile-time => use the so-called aop pro-compiler to do bytecode manipulation. Load-time => you need either a special system class loader or in JDK 5.0 you use the javaagent option.
I want to use JDK 5.0 via annotation and also I want to use the load-time mode (I don?t want to do any pre-compilation at all). I think that this way is easy for a beginner like me in JbossCache. No xml files, no pre-compilation? just annotation
I am using JBossCache 1.4.1. GA under Jboss 4.0.5. GA (EJB3).
-- POJO declaration --
For the first step, I am using two classes from example directory (JBossCache-1.4.1.GA\examples\PojoCache\annotated50), Person.java and Address.java. So this is the POJO declaration:
| package stpd.component.sensors.reads;
|
| /**
| * @author Ben Wang
| */
| @org.jboss.cache.aop.annotation.InstanceOfPojoCacheable
| public class Person {
| protected String name;
| protected Address address;
|
| ...
|
| package stpd.component.sensors.reads;
|
| /**
| * @author Ben Wang
| */
| @org.jboss.cache.aop.annotation.PojoCacheable
| public class Address {
| protected String city;
| protected int zip;
| protected String street;
|
| ...
|
-- Instrumentation ?
For the second step I am using file \META-INF\jboss-aop.xml:
| <?xml version="1.0" encoding="UTF-8"?>
|
| <!--
| This is the meta file to declare user's POJO as "aspectized" under
| JBossCacheAop. User will need this file when:
| 1. Run off-line precompier, aopc, to generate the "aspectized" class
| 2. Run on-line with a special aop class loader.
| -->
| <aop>
| <prepare expr="field(* @org.jboss.cache.aop.annotation.PojoCacheable->*)" />
| <prepare expr="field(* $instanceof{(a)org.jboss.cache.aop.annotation.InstanceOfPojoCacheable}->*)" />
| </aop>
|
There is an example called ?annotated50? that uses JDK50 POJO Cache annotation and that can be run in load-time mode. It uses ant to build and run the example. This is how you run the example in Load-time mode:
| <target name="run.loadtime.example" depends="compile" description="run standalone server replicator.">
| <java classname="test.examples.StudentMaintTest" fork="yes">
| <jvmarg value="-Djboss.aop.path=${cache_resources}/jboss-aop.xml"/>
| <jvmarg value="-javaagent:${cache_lib-50}/jboss-aop-jdk50.jar"/>
| <classpath refid="lib.classpath"/>
| <classpath path="${output}/etc"/>
| <classpath path="${build}"/>
| </java>
| </target>
|
I am not using ant to build my project, and I don?t know how to use javaagent option for JDK 5.0.
Sorry and thank you agian.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008946#4008946
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008946
17 years, 11 months
[JBoss Seam] - Re: Deploy Seam 1.1 to websphere without EJB
by jbnewb
Hi Gavin,
Would be great if you can point me to the script for Websphere once Michael has it.
I have managed to get my WAR file "installed" in websphere 6.1 - Debugging into it, I also see that Seam's Scanner loads the seam @Name'ed components.
However, when an attempt is made to load the page, the SeamVariableResolver is invoked and I get the following exception - It somehow seems like the application context does not get set with any value - please help.
javax.faces.el.EvaluationException: Cannot get value for expression '#{userbean.welcomeMessage}'
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:402)
at javax.faces.component.UIOutput.getValue(UIOutput.java:77)
at org.apache.myfaces.shared_impl.renderkit.RendererUtils.getStringValue(RendererUtils.java:217)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.renderOutput(HtmlTextRendererBase.java:69)
at org.apache.myfaces.shared_impl.renderkit.html.HtmlTextRendererBase.encodeEnd(HtmlTextRendererBase.java:57)
at javax.faces.component.UIComponentBase.encodeEnd(UIComponentBase.java:536)
at javax.faces.webapp.UIComponentTag.encodeEnd(UIComponentTag.java:495)
at javax.faces.webapp.UIComponentTag.doEndTag(UIComponentTag.java:363)
at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_h_outputText_0(_sayHello_5F_jspx.java:102)
at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_h_form_0(_sayHello_5F_jspx.java:123)
at com.ibm._jsp._sayHello_5F_jspx._jspx_meth_f_view_0(_sayHello_5F_jspx.java:150)
at com.ibm._jsp._sayHello_5F_jspx._jspService(_sayHello_5F_jspx.java:76)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:85)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:118)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:115)
at com.ibm.ws.jsp.webcontainerext.AbstractJSPExtensionServletWrapper.handleRequest(AbstractJSPExtensionServletWrapper.java:168)
at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:308)
at org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:416)
at org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:234)
at org.ajax4jsf.framework.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:101)
at org.ajax4jsf.framework.ajax.AjaxViewHandler.renderView(AjaxViewHandler.java:197)
at org.jboss.seam.jsf.SeamViewHandler.renderView(SeamViewHandler.java:59)
at org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:384)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:138)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:966)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:907)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:145)
at org.jboss.seam.servlet.SeamExceptionFilter.doFilter(SeamExceptionFilter.java:46)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at org.jboss.seam.servlet.SeamRedirectFilter.doFilter(SeamRedirectFilter.java:32)
at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:190)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:130)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain._doFilter(WebAppFilterChain.java:87)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:696)
at com.ibm.ws.webcontainer.filter.WebAppFilterManager.doFilter(WebAppFilterManager.java:641)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:475)
at com.ibm.ws.wswebcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:463)
at com.ibm.ws.webcontainer.webapp.WebApp.handleRequest(WebApp.java:3107)
at com.ibm.ws.webcontainer.webapp.WebGroup.handleRequest(WebGroup.java:238)
at com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:811)
at com.ibm.ws.wswebcontainer.WebContainer.handleRequest(WebContainer.java:1425)
at com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:92)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:465)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:394)
at com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.ready(HttpInboundLink.java:274)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.sendToDiscriminators(NewConnectionInitialReadCallback.java:214)
at com.ibm.ws.tcp.channel.impl.NewConnectionInitialReadCallback.complete(NewConnectionInitialReadCallback.java:113)
at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:152)
at com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:213)
at com.ibm.io.async.AbstractAsyncFuture.fireCompletionActions(AbstractAsyncFuture.java:195)
at com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:136)
at com.ibm.io.async.ResultHandler.complete(ResultHandler.java:193)
at com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:725)
at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:847)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1498)
Caused by: java.lang.IllegalStateException: No application context active
at org.jboss.seam.Component.forName(Component.java:1559)
at org.jboss.seam.Component.getInstance(Component.java:1609)
at org.jboss.seam.Component.getInstance(Component.java:1592)
at org.jboss.seam.jsf.SeamVariableResolver.resolveVariable(SeamVariableResolver.java)
at org.apache.myfaces.config.LastVariableResolverInChain.resolveVariable(LastVariableResolverInChain.java:42)
at org.apache.myfaces.el.ValueBindingImpl$ELVariableResolver.resolveVariable(ValueBindingImpl.java:574)
at org.apache.commons.el.NamedValue.evaluate(NamedValue.java:124)
at org.apache.commons.el.ComplexValue.evaluate(ComplexValue.java:140)
at org.apache.myfaces.el.ValueBindingImpl.getValue(ValueBindingImpl.java:383)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008934#4008934
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008934
17 years, 11 months