facebook

An EJB Tutorial

  1. MyEclipse Archived
  2.  > 
  3. Documentation
Viewing 15 posts - 1 through 15 (of 25 total)
  • Author
    Posts
  • #198859 Reply

    K. Djaafar
    Member

    Do you know when the EJB section concerning tje EJB development (creation of EJB modules, session EJB and use of some patterns) will be available ?
    Karim

    #198907 Reply

    support-michael
    Keymaster

    I expect a documentation update in the next few weeks. We have a resource slotted to this task after the next MyEclipse release.

    Michael
    MyEclipse Support

    #199919 Reply

    Brian
    Member

    So how’s the documentation comming?
    Any expected date for the EJB documentation?

    Brian
    (MyEclipse Support-er) 😉

    #199922 Reply

    Scott Anderson
    Participant

    Brian,

    We’ve updated the MyEclipse User Guide in the last couple of version of MyEclipse, but have apparently neglected to update the version hosted on the website. It is now up to date for 2.6.4 and includes sections on creating and using EJB projects etc. We’ll continue to add more in this area, but this is at least a start.

    –Scott
    MyEclipse Support

    #201836 Reply

    jxie
    Member

    Do you have a j2ee sample tutorial about how to deploy to different servers?

    #201868 Reply

    support-michael
    Keymaster

    Docs are still in the works. We hope to have new and updated docs for the 2.7/3.7 GA.

    Michael
    MyEclipse Support

    #207031 Reply

    ATRajan
    Member

    you must have any draftversion of the sample docs. if you have plese post it atleast in the forums….

    MY ECLIPSE is a ver good tool

    By looking at the interfaces

    i really admire you hard work

    . but inorder to improve its popularity you will have to add some cool tutorial stuff, Handbooks etc appart from documentation.

    #209050 Reply

    LiLaLuna
    Member

    I created an simple Entity EJB tutorial with jboss, postgres (hints for mysql). Just in case you are looking for something very basic. 🙄

    http://www.laliluna.de/tutorial/simpleEJB/xDoclet_jboss_first_EJB.html

    Yours Sebastian

    #209055 Reply

    Riyad Kalla
    Member

    Sebastian,
    This looks great, I will talk to the team about getting this linked from our main documentation page with appropriate credits.

    We really appreciate the effort!

    #209681 Reply

    Murtuza
    Member

    Can anyone tell me where i can find a book or tutorial which can help me with J2EE development step by step (may be with example). I have downloaded MyEclipse, subcribed to membership, installed JBoss and MySQL. All i need now is a good book or tutorial to start with.

    #209682 Reply

    Riyad Kalla
    Member

    As you are waiting for a book, I think a great resource to start with is here: http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

    If you have NEVER done/see/read about EJB’s before, then you might need to see some real code before you start to get the general idea behind it first. I know that when I tried to learn web development before (I meant JSP/Servlet) and I started reading EJB/J2EE stuff right off the bat, I was so lost it was unbelievable… but after a while with JSP/Servlet, then moving to frameworks (Struts/Spring/etc.) now moving to EJB won’t be a problem.

    #209694 Reply

    Murtuza
    Member

    No, I did not mean that, in fact i have developed a simple EJB application on Sun One Studio. Studio allows to do lot of table mapping to Entity Bean through wizards (of course it don’t expect same from eclipse) and even creating Data Source, creating test application and deployment is all made very simple.

    I downloaded Eclipse as i learned from Internet that it is most excepted platform right now. I started out with simple Session Bean from this link. http://myeclipseide.com/enterpriseworkbench/help/topic/com.genuitec.myeclipse.doc/html/tasks/EJB/creatingEJB.htm, but it seams even this is not full information. How do you deploy this Bean and run test application. Secondly this user guide does not contain any documentation on developing Entity Bean. Can you guide me to right tutorial. I am well aware of EJB Concepts and XDoclet concepts, its just that these documentation and manuals are not helping and i cannot move forward.

    From my point of view it would be nice to have a tutorial with an example (simple one with a session bean and an entity bean) that is developed from scratch till deploy in a tutorial.

    #209704 Reply

    Greg
    Member

    Does the following resource help?
    http://www.laliluna.de/tutorial/simpleEJB/xDoclet_jboss_first_EJB.html

    This tutorial doesn’t go into detail about the actual deploying to the app server. You can look at the MyEclipse documentation to supplement this section.
    http://myeclipseide.com/enterpriseworkbench/help/topic/com.genuitec.myeclipse.doc/html/tasks/Deployment/deployingJ2EEProject.htm

    #209751 Reply

    Murtuza
    Member

    Thanks, This is a very simple example but good enough to understand the workflow in MEclipse. I was not able to deploy it sucessfuly. When i start JBoss3.2.4 server i get following errors:

    08:51:17,250 INFO [RARMetaData] Loading JBoss Resource Adapter for JDBC 2 XA drivers
    08:51:17,250 INFO [RARMetaData] Required license terms present. See deployment descriptor.
    08:51:22,421 WARN [NestedThrowable] Duplicate throwable nesting of same base type: class org.jboss.deployment.DeploymentException is assignable from: class org.jboss.deployment.DeploymentException
    08:51:22,421 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.4/server/default/deploy/jms/mysql-jdbc2-service.xml
    org.jboss.deployment.DeploymentException: create operation failed for package file:/C:/jboss-3.2.4/server/default/deploy/jms/mysql-jdbc2-service.xml; – nested throwable: (org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.mq:service=DestinationManager)
    at org.jboss.deployment.SARDeployer.create(SARDeployer.java:227)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy7.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:367)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
    at org.jboss.Main.boot(Main.java:144)
    at org.jboss.Main$1.run(Main.java:389)
    at java.lang.Thread.run(Thread.java:534)
    Caused by: org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.mq:service=DestinationManager
    at org.jboss.system.ServiceCreator.install(ServiceCreator.java:69)
    at org.jboss.system.ServiceConfigurator.internalInstall(ServiceConfigurator.java:149)
    at org.jboss.system.ServiceConfigurator.install(ServiceConfigurator.java:114)
    at org.jboss.system.ServiceController.install(ServiceController.java:198)
    at sun.reflect.GeneratedMethodAccessor22.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy4.install(Unknown Source)
    at org.jboss.deployment.SARDeployer.create(SARDeployer.java:204)
    … 65 more
    08:51:24,937 INFO [MailService] Mail Service bound to java:/Mail
    08:51:26,437 INFO [Embedded] Catalina naming disabled
    08:51:28,265 INFO [Http11Protocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
    08:51:28,390 INFO [Catalina] Initialization processed in 1719 ms
    08:51:28,390 INFO [StandardService] Starting service jboss.web
    08:51:28,421 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.0.26
    08:51:28,453 INFO [StandardHost] XML validation disabled
    08:51:28,562 INFO [Catalina] Server startup in 172 ms
    08:51:28,750 WARN [DeploymentInfo] Only the root deployment can set the loader repository, ingoring config=null

    Futher when i deploy the SimpleBean i get following errors:

    ConnectionManager ‘jboss.jca:service=LocalTxCM,name=MySqlDS to JNDI name ‘java:/MySqlDS’
    08:51:34,640 WARN [verifier] EJB spec violation:
    Bean : SimpleBean
    Method : public String ejbCreate() throws CreateException
    Section: 10.6.4
    Warning: The return type of an ejbCreate(…) method must be the entity bean’s primary key type.

    08:51:34,718 ERROR [MainDeployer] could not create deployment: file:/C:/jboss-3.2.4/server/default/deploy/SimpleEJB.jar/
    org.jboss.deployment.DeploymentException: Verification of Enterprise Beans failed, see above for error messages.
    at org.jboss.ejb.EJBDeployer.create(EJBDeployer.java:517)
    at org.jboss.deployment.MainDeployer.create(MainDeployer.java:790)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:644)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at sun.reflect.GeneratedMethodAccessor17.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy7.deploy(Unknown Source)
    at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:304)
    at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:478)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:201)
    at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(AbstractDeploymentScanner.java:274)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:271)
    at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:221)
    at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:837)
    at $Proxy0.start(Unknown Source)
    at org.jboss.system.ServiceController.start(ServiceController.java:367)
    at sun.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy4.start(Unknown Source)
    at org.jboss.deployment.SARDeployer.start(SARDeployer.java:251)
    at org.jboss.deployment.MainDeployer.start(MainDeployer.java:836)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:645)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:608)
    at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:592)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.jboss.mx.server.ReflectedDispatcher.dispatch(ReflectedDispatcher.java:60)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:61)
    at org.jboss.mx.server.Invocation.dispatch(Invocation.java:53)
    at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
    at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:185)
    at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:473)
    at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
    at $Proxy5.deploy(Unknown Source)
    at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:407)
    at org.jboss.system.server.ServerImpl.start(ServerImpl.java:311)
    at org.jboss.Main.boot(Main.java:144)
    at org.jboss.Main$1.run(Main.java:389)
    at java.lang.Thread.run(Thread.java:534)
    08:51:34,843 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=file:/C:/jboss-3.2.4/server/default/deploy/jmx-console.war/
    08:51:35,843 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=file:/C:/jboss-3.2.4/server/default/tmp/deploy/tmp27303web-console.war/
    08:51:37,203 ERROR [URLDeploymentScanner] Incomplete Deployment listing:
    Incompletely deployed packages:
    org.jboss.deployment.DeploymentInfo@de95b39a { url=file:/C:/jboss-3.2.4/server/default/deploy/jms/mysql-jdbc2-service.xml }
    deployer: org.jboss.deployment.SARDeployer@1d6a56e
    status: Deployment FAILED reason: create operation failed for package file:/C:/jboss-3.2.4/server/default/deploy/jms/mysql-jdbc2-service.xml; – nested throwable: (org.jboss.deployment.DeploymentException: Trying to install an already registered mbean: jboss.mq:service=DestinationManager)
    state: FAILED
    watch: file:/C:/jboss-3.2.4/server/default/deploy/jms/mysql-jdbc2-service.xml
    lastDeployed: 1089697882390
    lastModified: 1089697882375
    mbeans:

    org.jboss.deployment.DeploymentInfo@a5807151 { url=file:/C:/jboss-3.2.4/server/default/deploy/SimpleEJB.jar/ }
    deployer: org.jboss.ejb.EJBDeployer@29ea31
    status: Deployment FAILED reason: Verification of Enterprise Beans failed, see above for error messages.
    state: FAILED
    watch: file:/C:/jboss-3.2.4/server/default/deploy/SimpleEJB.jar/META-INF/ejb-jar.xml
    lastDeployed: 1089697894140
    lastModified: 1089646412299
    mbeans:

    I have checked i am sure that return type of ejb create is same as Primary Key. I am stuck again i guess. Can you help me.

    Thanks

    Murtuza

    #209753 Reply

    Murtuza
    Member

    HI

    I found the problem, i had not removed hsqldb-jdbc2-service.xml from the deploy directory. But I still get the second exception.
    ConnectionManager ‘jboss.jca:service=LocalTxCM,name=MySqlDS to JNDI name ‘java:/MySqlDS’
    08:51:34,640 WARN [verifier] EJB spec violation:
    Bean : SimpleBean
    Method : public String ejbCreate() throws CreateException
    Section: 10.6.4
    Warning: The return type of an ejbCreate(…) method must be the entity bean’s primary key type.

    More details of the this error is in my last post. I could not find any post on this topic. Can you help me on this.

    Thanks

    Murtuza

Viewing 15 posts - 1 through 15 (of 25 total)
Reply To: An EJB Tutorial

You must be logged in to post in the forum log in