[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-26 Thread petemuir
"petemuir" wrote : using a SMPC called entityManager View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040895#4040895 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4040895 ___ jb

[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-26 Thread zielonyplot
So I have one question more: should I write exactly Component.getInstance("entityManager") or it can be Component.getInstance("EntityManager")? Where this String is declared? View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4040893#4040893 Reply to the post :

[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-26 Thread petemuir
You can't get the EntityManager in a jsp page. If you want it in a servlet and are using a SMPC called entityManager you can do Component.getInstance("entityManager"), but you will need to transaction demarcation yourself. In general Seam/JSF without you needing to mix your presentation and b

[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-26 Thread zielonyplot
So, in my servlet, I simply need to write something like this: | import java.io.*; | import javax.servlet.*; | import javax.servlet.http.*; | | public class SomeServlet extends HttpServlet | { | |@PersistenceContext |private EntityManager em; | | public vo

[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-26 Thread jlaskowski
Witaj, What Tomcat version are you using? If it's lower than Tomcat 6, you should forget about expecting @PersistenceContext to work - servlets are managed components, but only for a servlet container that understands the notion of annotation processing that's introduced in Java EE 5. It should

[jboss-user] [JBoss Seam] - Re: jndi - tomcat - jsp file

2007-04-25 Thread zielonyplot
"zielonyplot" wrote : Hi! | I have a little problem: in my jsp file I need to get instance of EntityManager. Could somebody tell me how to do this? In POJO classes I simply use @In annotation, but it doesn't work in jsp files. | Please, help! I forget - if it is impossible in jsp files, mayb