I am so thankful for your helps, finally it worked. This is the final situation:
I have changed ejb call part like that: | Context context = new InitialContext(); | PrStaffInterface prstaff = (PrStaffInterface)context.lookup("surgeonfish/PrStaffHome/local"); | prstaff.findById(new Integer(username)); | And I have changed little part of persistence.xml | <persistence> | <persistence-unit name="time_report_persistence_context"> | <provider>org.hibernate.ejb.HibernatePersistence</provider> | <jta-data-source>java:/time_reporting_data_source</jta-data-source> | <jar-file>/surgeonfish.jar</jar-file>-->this place changed | <properties> | <property name="hibernate.hbm2ddl.auto" value="create-drop"/> | <property name="hibernate.show_sql" value="true"/> | <property name="dialect">org.hibernate.dialect.MySQLDialect</property> | <property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/> | </properties> | </persistence-unit> | </persistence> | I have thought, I dont need to lookup. The ejb container is injecting, or intercepting at the object initialization and giving already created ejb object. Thanks again. View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4159169#4159169 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4159169 _______________________________________________ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user