2 Replies Latest reply on Mar 31, 2009 3:51 PM by piotguz

    call seam entity from servlet

      Hello


      I'm working on a project of central logging system. For prototype I've created a simple table in HSQL. I've used JBoss tools in JBoss developer studio to generate seam project and generate seam entity from existing database tables. Everything is fine, I can easily manage data using JSF pages.


      But... nobody will put log data manually using web page. So my question is how can I call seam entity to persist specified data from servlet or any other class?


      Let's say that I want to have a client application, which calls a servlet and passes log information to it (ex http call: localhost/LogServlet?msg="log information"). Then servlet grabs data and puts it into database using seam entity. Is there a way to do it? Or should I access database from servlet directly?


      A piece of code (calling seam entity and persisting data) would be a great help for me


      Thanks in advance