This week's book giveaway is in the OCAJP forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide 1Z0-808 and have Jeanne Boyarsky & Scott Selikoff on-line! See this thread for details.
If you use dependency injection to get it using the @PersistenceContext annotation then you should not close it as this is handled for you. However if you are creating it from the factory as you are in your snippet then absolutely it is your responsibility to make sure it gets closed every time.