<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<body link="#355491" alink="#4262a1" vlink="#355491" style="background: #e2e2e2; margin: 0; padding: 20px;">

<div>
        <table cellpadding="0" bgcolor="#FFFFFF" border="0" cellspacing="0" style="border: 1px solid #dadada; margin-bottom: 30px; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                <tbody>
                        <tr>

                                <td>

                                        <table border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border: solid 2px #ccc; background: #dadada; width: 100%; -moz-border-radius: 6px; -webkit-border-radius: 6px;">
                                                <tbody>
                                                        <tr>
                                                                <td bgcolor="#000000" valign="middle" height="58px" style="border-bottom: 1px solid #ccc; padding: 20px; -moz-border-radius-topleft: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 5px; -webkit-border-top-left-radius: 5px;">
                                                                        <h1 style="color: #333333; font: bold 22px Arial, Helvetica, sans-serif; margin: 0; display: block !important;">
                                                                        <!-- To have a header image/logo replace the name below with your img tag -->
                                                                        <!-- Email clients will render the images when the message is read so any image -->
                                                                        <!-- must be made available on a public server, so that all recipients can load the image. -->
                                                                        <a href="http://community.jboss.org/index.jspa" style="text-decoration: none; color: #E1E1E1">JBoss Community</a></h1>
                                                                </td>

                                                        </tr>
                                                        <tr>
                                                                <td bgcolor="#FFFFFF" style="font: normal 12px Arial, Helvetica, sans-serif; color:#333333; padding: 20px;  -moz-border-radius-bottomleft: 4px; -moz-border-radius-bottomright: 4px; -webkit-border-bottom-right-radius: 5px; -webkit-border-bottom-left-radius: 5px;"><h3 style="margin: 10px 0 5px; font-size: 17px; font-weight: normal;">
    Re: EJB - JBOSS - JNDI      HELP!!!
</h3>
<span style="margin-bottom: 10px;">
    created by <a href="http://community.jboss.org/people/bertoz84">stefano bertozzi</a> in <i>JNDI and Naming</i> - <a href="http://community.jboss.org/message/594535#594535">View the full discussion</a>
</span>
<hr style="margin: 20px 0; border: none; background-color: #dadada; height: 1px;">

<div class="jive-rendered-content"><p>I think that this <span style="text-decoration: underline;"><strong>IS</strong></span> the <em>Graal</em> of what's happening to my client:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a class="" href="http://community.jboss.org/docs/DOC-12835">http://community.jboss.org/wiki/HowtouseanapplicationclientinJBoss-5</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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 <em>"extremly long command"</em> on command prompt. </p><p>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 <em>"extremly long command"</em> in it. If someone knows how to do it I would appreciate.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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? </p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I did this tutorial ( first part ):</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><a class="" href="http://community.jboss.org/docs/DOC-14653">http://community.jboss.org/wiki/EJB31inAS600M2</a></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>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.</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Another question:</p><p>I tryed to "Run on server" this tutorial; that's the console output:</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>16:18:59,843 INFO&#160; [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@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/}</em></p><p><em>16:18:59,844 INFO&#160; [org.jboss.ejb3.deployers.Ejb3DependenciesDeployer] Encountered deployment AbstractVFSDeploymentContext@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/}</em></p><p><em>16:18:59,875 INFO&#160; [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@7e13674c into MC at org.jboss.ejb.bean.instantiator/CalculatorEJB3.1EAR/CalculatorEJB3.1/Calculator</em></p><p><em>16:18:59,875 INFO&#160; [org.jboss.ejb3.instantiator.deployer.BeanInstantiatorDeployerBase] Installed org.jboss.ejb3.instantiator.impl.Ejb31SpecBeanInstantiator@7e13674c into MC at org.jboss.ejb.bean.instantiator/CalculatorEJB3.1EAR/CalculatorEJB3.1/AccountManagerBean</em></p><p><em>16:18:59,876 WARN&#160; [org.jboss.ejb3.interceptor.InterceptorInfoRepository] EJBTHREE-1852: InterceptorInfoRepository is deprecated</em></p><p><em>16:18:59,942 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] Created KernelDeployment for: CalculatorEJB3.1.jar</em></p><p><em>16:18:59,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=AccountManagerBean,service=EJB3</em></p><p><em>16:18:59,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; with dependencies:</em></p><p><em>16:18:59,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; and demands:</em></p><p><em>16:18:59,943 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss-switchboard:appName=CalculatorEJB3.1EAR,module=CalculatorEJB3.1,name=AccountManagerBean; Required: Create</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss.ejb:service=EJBTimerService; Required: Described</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss-injector:topLevelUnit=CalculatorEJB3.1EAR.ear,unit=CalculatorEJB3.1.jar,bean=AccountManagerBean; Required: Described</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; and supplies:</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:CalculatorEJB3.1EAR/AccountManagerBean/remote-org.jboss.ejb3.example.AccountManager</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;Class:org.jboss.ejb3.example.AccountManager</em></p><p><em>16:18:59,944 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:CalculatorEJB3.1EAR/AccountManagerBean/remote</em></p><p><em>16:18:59,945 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:AccountManagerBean</em></p><p><em>16:18:59,945 INFO&#160; [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</em></p><p><em>16:18:59,953 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel] installing bean: jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=Calculator,service=EJB3</em></p><p><em>16:18:59,953 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; with dependencies:</em></p><p><em>16:18:59,953 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; and demands:</em></p><p><em>16:18:59,953 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss.ejb:service=EJBTimerService; Required: Described</em></p><p><em>16:18:59,953 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jboss-switchboard:appName=CalculatorEJB3.1EAR,module=CalculatorEJB3.1,name=Calculator; Required: Create</em></p><p><em>16:18:59,954 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160; and supplies:</em></p><p><em>16:18:59,954 INFO&#160; [org.jboss.ejb3.deployers.JBossASKernel]&#160;&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;jndi:Calculator</em></p><p><em>16:18:59,955 INFO&#160; [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</em></p><p><em>16:19:00,004 INFO&#160; [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=Calculator,service=EJB3</em></p><p><em>16:19:00,004 INFO&#160; [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.ejb3.example.Calculator ejbName: Calculator</em></p><p><em>16:19:00,005 INFO&#160; [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:</em></p><p><em>16:19:00,005 WARN&#160; [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers</em></p><p><em>16:19:00,042 INFO&#160; [org.jboss.ejb3.nointerface.impl.jndi.AbstractNoInterfaceViewBinder] Binding the following entry in Global JNDI for bean:Calculator</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;CalculatorEJB3.1EAR/Calculator/no-interface -&gt; EJB3.1 no-interface view</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>16:19:00,059 INFO&#160; [org.jboss.ejb3.session.SessionSpecContainer] Starting jboss.j2ee:ear=CalculatorEJB3.1EAR.ear,jar=CalculatorEJB3.1.jar,name=AccountManagerBean,service=EJB3</em></p><p><em>16:19:00,060 INFO&#160; [org.jboss.ejb3.EJBContainer] STARTED EJB: org.jboss.ejb3.example.AccountManagerBean ejbName: AccountManagerBean</em></p><p><em>16:19:00,066 INFO&#160; [org.jboss.ejb3.proxy.impl.jndiregistrar.JndiSessionRegistrarBase] Binding the following Entries in Global JNDI:</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;CalculatorEJB3.1EAR/AccountManagerBean/remote - EJB3.x Default Remote Business Interface</em></p><p><em>&#160;&#160;&#160;&#160; &#160;&#160;&#160;&#160;&#160;CalculatorEJB3.1EAR/AccountManagerBean/remote-org.jboss.ejb3.example.AccountManager - EJB3.x Remote Business Interface</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p><em>16:19:00,067 WARN&#160; [org.jboss.ejb3.TimerServiceContainer] EJBTHREE-2193: using deprecated TimerServiceFactory for restoring timers</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>It sounds good but it created a<strong> folder</strong> named <em>CalculatorEJB3.1EAR.ear </em>in the path: <em>C:\Users\Stefano\Documents\Eclipse\.metadata\.plugins\org.jboss.ide.eclipse.as.core\JBoss_6.0_Runtime_1_Server1299168094927\deploy</em></p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>I expected to have a <strong>file</strong> 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?</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p style="min-height: 8pt; height: 8pt; padding: 0px;">&#160;</p><p>Thank you for helping the biggest JBoss-noob ever, me!</p></div>

<div style="background-color: #f4f4f4; padding: 10px; margin-top: 20px;">
    <p style="margin: 0;">Reply to this message by <a href="http://community.jboss.org/message/594535#594535">going to Community</a></p>
        <p style="margin: 0;">Start a new discussion in JNDI and Naming at <a href="http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2083">Community</a></p>
</div></td>
                        </tr>
                    </tbody>
                </table>


                </td>
            </tr>
        </tbody>
    </table>

</div>

</body>
</html>