• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
  • Mikalai Zaikin

ejbPostCreate doesn't execute

Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,

I'm using EJB 2.1 and I'm new to J2EE. I experience some problems with CMR so I'm trying to debug my code with some silly System.out.println statements, and I found that ejbPostCreate(...) doesn't execute for some reason unexplainable. Can anyone shed some light into this?

I've attached parts of the code below. When I run this code only "yoyo1" is displayed... leaving "yoyo2" in ejbPostCreate out.

* @ejb.bean name="UserBevaka"
* display-name="Name for UserBevaka"
* description="Description for UserBevaka"
* local-jndi-name = "ejb/UserBevaka"
* type="CMP"
* cmp-version="2.x"
* view-type="local"
* primkey-field = "uniktBevakningsID"
* schema="userBevakaSchema"
* @ejb.pk class = "java.lang.Integer"
* @ejb.persistence table-name="userbevaka"
* @ejb.home generate="local" local-class="test.interfaces.UserBevakaLocalHome"
* @ejb.interface generate="local" local-class="test.interfaces.UserBevakaLocal"
* @jboss.entity-command name="mysql-get-generated-keys"
public abstract class UserBevakaBean implements EntityBean {


* Create method
* @ejb.create-method view-type = "local"
public java.lang.Integer ejbCreate(
java.lang.String username,
java.lang.Integer uniktAnstalldID,
AnstalldLocal anstalld) throws javax.ejb.CreateException {
setCreateDate(new java.sql.Date(new java.util.Date().getTime()));
return null;
* Post Create method
public void ejbPostCreate(
java.lang.String username,
java.lang.Integer uniktAnstalldID,
AnstalldLocal anstalld) throws javax.ejb.CreateException {
Blood pressure normal? What do I change to get "magnificent"? Maybe this tiny ad?
a bit of art, as a gift, the permaculture playing cards
    Bookmark Topic Watch Topic
  • New Topic