How to use @Resource annotation?



I have a piece of java code here.



@PersistenceUnit
private EntityManagerFactory emf;

@Resource
private UserTransaction utx;


I can find persistence unit in persistence.xml configuration file. But
I cannot find Resource configuration information in a descriptor file.
How does the container do resource injection? Thank you very much.

Chen
.



Relevant Pages

  • hibernate annotations I get a MappingNotFoundException
    ... hibernate version, but I have the latest 3.2 release. ... I can generate a database schema fine, So I assume that something else ... Here is the error I get and my Configuration file ... INFO: configuring from resource: /hibernate.cfg.xml ...
    (comp.lang.java.programmer)
  • Re: Embed a confugeration file inside exeutable
    ... Since this isn't a user-modifiable configuration file, there are numerous ways to get the contents ... you can include constant literal strings in an #include ... You can also create a custom resource which you can retrieve at runtime ... Look for the MSDN Library article entitled "Creating a New Custom or Data Resource" ...
    (microsoft.public.vc.ide_general)
  • Embed a confugeration file inside exeutable
    ... I open a configuration file with fopen and parse its content in my VC 6.0 ... I want to embed it (as a resource or something similar) inside ... Prev by Date: ...
    (microsoft.public.vc.ide_general)