[jboss-user] [JNDI and Naming] - Re: EJB - JBOSS - JNDI HELP!!!

stefano bertozzi do-not-reply at jboss.com
Mon Mar 21 12:55:59 EDT 2011


stefano bertozzi [http://community.jboss.org/people/bertoz84] created the discussion

"Re: EJB - JBOSS - JNDI      HELP!!!"

To view the discussion, visit: http://community.jboss.org/message/594535#594535

--------------------------------------------------------------
I think that this *IS* the +Graal+ of what's happening to my client:

 http://community.jboss.org/docs/DOC-12835 http://community.jboss.org/wiki/HowtouseanapplicationclientinJBoss-5

If i understand well this article, it says that a Java Client doesn't see a lot of thing related to JBOSS ( that's why i can't do a lookup without create first an environment and i have the "misses the log4j file" warn ); so i should launch my client doing that +"extremly long command"+ on command prompt. 
So i guess that every tutorial on internet that doesn't create the environment can run their clients through Eclipse ( as i do ) because there's a way to set this +"extremly long command"+ in it. If someone knows how to do it I would appreciate.

I suppose that if i create many beans and use, lookup, etc...., them in a program that should run as an .ear on a server ( suppose the client can access my application through a browser and see a web page that uses session and entity beans ), i won't have to create the environment to lookup my beans. Am i right? 

I did this tutorial ( first part ):

 http://community.jboss.org/docs/DOC-14653 http://community.jboss.org/wiki/EJB31inAS600M2

and i needed to add the env part only to lookup the AccountManager through the Client and not to lookup the Calculator through the AccountManager.






Another question:
I tryed to "Run on server" this tutorial; that's the console output:

+16:18:59,843 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1382208438{vfs:///C:/Users/Stefano/Documents/Eclipse/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_1_Server1299168094927/deploy/CalculatorEJB3.1EAR.ear/CalculatorEJB3.1.jar/}+
+16:18:59,844 INFO  [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext at 1382208438{vfs:///C:/Users/Stefano/Documents/Eclipse/.metadata/.plugins/org.jboss.ide.eclipse.as.core/JBoss_6.0_Runtime_1_Server1299168094927/deploy/CalculatorEJB3.1EAR.ear/CalculatorEJB3.1.jar/}+
+16:18:59,875 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator at 7e13674c into MC at org.jboss.ejb.bean.instantiator/CalculatorEJB3.1EAR/CalculatorEJB3.1/Calculator+
+16:18:59,875 INFO  [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator at 7e13674c into MC at org.jboss.ejb.bean.instantiator/CalculatorEJB3.1EAR/CalculatorEJB3.1/AccountManagerBean+
+16:18:59,876 WARN  [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated+
+16:18:59,942 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: CalculatorEJB3.1.jar+
+16:18:59,943 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=AccountManagerBean,service=EJB3+
+16:18:59,943 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:+
+16:18:59,943 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:+
+16:18:59,943 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss-switchboard:appName=CalculatorEJB3.1EAR,module=CalculatorEJB3.1,name=AccountManagerBean; Required: Create+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss.ejb:service=EJBTimerService; Required: Described+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss-injector:topLevelUnit=CalculatorEJB3.1EAR.ear,unit=CalculatorEJB3.1.jar,bean=AccountManagerBean; Required: Described+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jndi:CalculatorEJB3.1EAR/AccountManagerBean/remote-org.jboss.ejb3.example.AccountManager+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           Class:org.jboss.ejb3.example.AccountManager+
+16:18:59,944 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jndi:CalculatorEJB3.1EAR/AccountManagerBean/remote+
+16:18:59,945 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jndi:AccountManagerBean+
+16:18:59,945 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=AccountManagerBean,service=EJB3) to KernelDeployment of: CalculatorEJB3.1.jar+
+16:18:59,953 INFO  [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=Calculator,service=EJB3+
+16:18:59,953 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   with dependencies:+
+16:18:59,953 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and demands:+
+16:18:59,953 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss.ejb:service=EJBTimerService; Required: Described+
+16:18:59,953 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jboss-switchboard:appName=CalculatorEJB3.1EAR,module=CalculatorEJB3.1,name=Calculator; Required: Create+
+16:18:59,954 INFO  [org.jboss.ejb3.deployers.JBossASKernel]   and supplies:+
+16:18:59,954 INFO  [org.jboss.ejb3.deployers.JBossASKernel]           jndi:Calculator+
+16:18:59,955 INFO  [org.jboss.ejb3.deployers.JBossASKernel] Added bean(jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=Calculator,service=EJB3) to KernelDeployment of: CalculatorEJB3.1.jar+
+16:19:00,004 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=Calculator,service=EJB3+
+16:19:00,004 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.ejb3.example.Calculator ejbName: Calculator+
+16:19:00,005 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:+
+16:19:00,005 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers+
+16:19:00,042 INFO  [org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:Calculator+

+          CalculatorEJB3.1EAR/Calculator/no-interface -> EJB3.1 no-interface view+

+16:19:00,059 INFO  [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=AccountManagerBean,service=EJB3+
+16:19:00,060 INFO  [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.ejb3.example.AccountManagerBean ejbName: AccountManagerBean+
+16:19:00,066 INFO  [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:+

+          CalculatorEJB3.1EAR/AccountManagerBean/remote - EJB3.x Default Remote Business Interface+
+          CalculatorEJB3.1EAR/AccountManagerBean/remote-org.jboss.ejb3.example.AccountManager - EJB3.x Remote Business Interface+

+16:19:00,067 WARN  [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers+


It sounds good but it created a *folder* named +CalculatorEJB3.1EAR.ear+ in the path: +C:\Users\Stefano\Documents\Eclipse\.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_6.0_Runtime_1_Server1299168094927\deploy+

I expected to have a *file* CalculatorEJB3.1EAR.ear under my JBoss_distr\server\default\deploy. Is this the usual behaviour? If i run my client i got errors. If i export my project as a .jar under my JBoss_distr\server\default\deploy it works. How to create the .ear file containing my .jar and .war?


Thank you for helping the biggest JBoss-noob ever, me!
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/594535#594535]

Start a new discussion in JNDI and Naming at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20110321/ba13f49b/attachment-0001.html 


More information about the jboss-user mailing list