[jboss-user] [JBoss Seam] - Context management for custom servlets
I'm using Seam-2.0.0.Beta1. According to the docs: anonymous wrote : 25.1.4.6. Context management for custom servlets | | ...Seam provides a servlet filter that can be applied to any other servlet that needs access to Seam components. | | This filter allows custom servlets to interact with the Seam contexts. It sets up the Seam contexts at the beginning of each request, and tears them down at the end of the request I'm reading this as saying that I can configure Seam to inject components into a simple on-JSF servlet. The relevant bits of my servlet are as follows: | @Name(documentDownloader) | public class DocumentDownloadServlet extends HttpServlet { | | @Logger | private Log log; | | @In( create=true ) | private Session hibernateSession; | | @Override | protected void doGet( HttpServletRequest request, HttpServletResponse response ) | throws ServletException, IOException { | | //etc. | My components.xml file contains | components xmlns=http://jboss.com/products/seam/components; | ... | xmlns:web=http://jboss.com/products/seam/web; | ... | | web:context-filter url-pattern=/dimmer/dim/* / However, no injection is taking place. What am I doing wrong? Thanks Richard View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4095027#4095027 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4095027 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - context management for custom servlets
Reference doc section 21.1.3 Seam servlet filters subsection Context management for custom servlets discusses web:context-filter url-pattern=/whatever/*/. It reads The context filter expects to find the conversation id of any conversation context in a request parameter named conversationId. You are responsible for ensuring that it gets sent in the request. Q1) It doesn't say what happens if there isn't one? If none is found a temporary conversation is started? Yes or no? Q2) What are all the contexts available (also as found by lookupInStatefulContexts)? Method, Event, Page, Conversation, Session, Business Process and Application? Which ones of the list? Q3) It isn't clear (says nothing) about transactions. Is the whole servlet request wrapped into one transaction? If so, great. Q4 if answer to Q3 is No) So could one annotate the Servlet with a @Name (scoped to event?) and then use @Transactional (for the doGet, doPost) or should one use another class as a component with @Name and in there @Transactional? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4030705#4030705 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4030705 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user