mahammad-fathi commented on issue #7990:
URL: https://github.com/apache/netbeans/issues/7990#issuecomment-2502799903

   After receiving the source code and compiling RC3/RC4 of NB24, the problem 
still persists.
   Ejb management and transactions must be managed by application servers, for 
example wildfly, and when creating a session bean from the default template, 
unfortunately, a code is generated that must be managed manually, like this
       @Resource
       private UserTransaction utx = null;
       @PersistenceUnit(unitName = "my_persistence_unit")
       private EntityManagerFactory emf = null;
   If this is a mistake and conflicts with the principles of j2ee. By default, 
the production code should allow the management of session beans by the 
application server. as follows:
       @PersistenceContext(unitName = "my_persistence_unit")
       private EntityManager em;
   
   --The solution to this problem is to change the template when creating beans 
from the template. For example, when creating a web application with maven and 
creating jsf page from entity, which causes the creation of JPA bean and CDI 
bean, the problem can be solved.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to