Examples of BlogPersistenceService


Examples of org.apache.aries.samples.blog.api.persistence.BlogPersistenceService

    return id;
  }

  public Author getAuthor() {
    try {
      BlogPersistenceService bps = (BlogPersistenceService) new InitialContext().lookup(
          "osgi:service/" + BlogPersistenceService.class.getName());
      return bps.getAuthor(authorId);
    } catch (NamingException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of org.apache.aries.samples.blog.api.persistence.BlogPersistenceService

    }
  }

  public Entry getEntry() {
    try {
      BlogPersistenceService bps = (BlogPersistenceService) new InitialContext().lookup(
          "osgi:service/" + BlogPersistenceService.class.getName());
      return bps.getBlogEntryById(entryId);
    } catch (NamingException e) {
      throw new RuntimeException(e);
    }
  }
View Full Code Here

Examples of org.apache.geronimo.test.jpa.entity.BlogPersistenceService

    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doPost(request,response);
    }

    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        BlogPersistenceService service = getBlogPersistenceService();
       
        service.createAuthor("john@gmail.com", new Date(), "John Doe", "JDoe", "Test Name");
        service.createBlogPost("john@gmail.com", "First Blog Entry", "Hello. This is my first blog entry", null);
       
        Author author = service.getAuthor("john@gmail.com");
       
        PrintWriter out = response.getWriter();
        out.println("<html><head><title>OSGi JPA Test Application</title></head></html>");
        out.println("<body><h1>");
        out.println("Blog entry successfully created: " + author.getDisplayName());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.