hi peeter, in this context the '@' sign is a so-called annotation. it was introduced as 'metadata' facility in release 5.0 of the java platform. please check:
http://java.sun.com/docs/books/tutorial/java/javaOO/annotations.html or http://java.sun.com/j2se/1.5.0/docs/guide/language/annotations.html as annotations are really useful and widely used, it is quite important to understand the basics. i suggest to play around with simple examples so you can see how annotations affect the behavior of your classes. -- stefan On Wed, Sep 30, 2009 at 8:48 AM, peeter brunch <peeterbru...@hotmail.com> wrote: > Hi, > > Can someone explain the meaning of the highlighted Java statement in the > following code especially the meaning of the @ sign in front of the > PersistenceUnit? Thanks. > > import database.BookDBAO; > import javax.servlet.*; > import util.Counter; > > import javax.ejb.*; > import javax.persistence.*; > > public final class ContextListener > implements ServletContextListener { > private ServletContext context = null; > > @PersistenceUnit > EntityManagerFactory emf; > > Regards, > Peeterbrunch > > > > > ________________________________ > Bing™ brings you maps, menus, and reviews organized in one place. Try it > now. > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Java EE (J2EE) Programming with Passion!" group. To post to this group, send email to java-ee-j2ee-programming-with-passion@googlegroups.com To unsubscribe from this group, send email to java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en -~----------~----~----~----~------~----~------~--~---