[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread echon
ok.. it's really strange. Nothing is injected in my JMX Service Objects. even | @Resource(mappedName = java:/portalDS) | private DataSource _dataSource; | does not work. But if I try to get it from JNDI | Context ctx = new InitialContext(); | _dataSource = (DataSource)

[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread [EMAIL PROTECTED]
You are doing?: | @Service | public class MyBean implements ... { | |@PersistenceContext EntityManager entityManager; | | } | | and entityManager is null? View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=3936621#3936621 Reply to the post

[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread [EMAIL PROTECTED]
just tried this. Works fine for me on CR2: | @Service | public class TravelAgentBean implements TravelAgentRemote | { | @PersistenceContext(unitName=titan) private EntityManager manager; | | public void createCabin(Cabin cabin) | { | manager.persist(cabin);

[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread echon
ok.. i tried again ;) Unfortunatelly same result. I thought it would be perhaps a bad configuration, so I install RC1 = it works, i install CR2 = null :'( My Service looks like this: | @Service(objectName = portal:service=SystemPropertyService) |

[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread echon
What i find very interesting is this: 2006-04-11 18:27:00,703 DEBUG [org.jboss.system.ServiceController] recording that portal:service=SystemPropertyService depends on persistence.units:unitName=portalEM ... 2006-04-11 18:27:00,781 DEBUG [org.jboss.system.ServiceController] Creating

[JBoss-user] [EJB 3.0] - Re: @PersistenceContext in JMX Service Object with 4.0.4RC2

2006-04-11 Thread echon
OK! THIS IS A BUG! Problem is that the EntityManager is injected AFTER the start() method of the JMX Service Object is executed! Because of this [EMAIL PROTECTED]'s code works, mine not :'( Is this realy how it should work? I want my Objects injected before I start my service, especially if