I've specified an jndi.properties default provided via
jboss in the $PATH env as A section. There's no
problem in the past when this propertie file set. 
In fact, this dilemma has been solved after switching
the xml build file used from $xdoclet/samples/ to
another one obtained from
http://muimi.com/j/jboss/xdoclet.html
the script as B section. Nevertheless, I'm interested
in knowing what differences between these two scripts
($xdoclet/samples and muimi.com). In my viewpoint it
ought to be the same thing simply with different usage
of ant tasks. Yet there may be some points I can't
distinguish.
Hope some one could tell me why or give me some hints
to make clear the problem I'm confused. I appreciate
your reply, sincerely.
Arsene



===========jndi.properties=======BEG
A.)

java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
java.naming.provider.url=jnp://localhost:1099
===========jndi.properties=======END
=============build.xml========END
B.)
<project name="jboss02" default="generate">

        <property name="xdoclet-home"
value="C:/xdoclet-1.2"/>
        <property name="jboss.home" value="C:/jboss-3.2.3"/>
        <property name="deploy.dir"
value="${jboss.home}/server/default/deploy"/>


    <path id="class.path">
        <fileset dir="${xdoclet-home}/lib">
            <include name="*.jar"/>
        </fileset>
                <pathelement
path="${jboss.home}/server/default/lib/jboss-j2ee.jar"
/>
    </path>

        <target name="clear">
                <delete dir="target"/>
        </target>

        <target name="init">
                <taskdef name="ejbdoclet"
                classname="xdoclet.modules.ejb.EjbDocletTask"
                classpathref="class.path"/>

        <mkdir dir="target/classes"/>
        <mkdir dir="target/src"/>
        <mkdir dir="target/meta-inf"/>
    </target>


        <target name="generate" depends="clear,init">

                <ejbdoclet
                    destdir="target/src"
                    excludedtags="@version,@author,@todo"
                    ejbspec="2.0"
                >

                        <fileset dir="src">
                            <include name="**/*Bean.java"/>
                        </fileset>
                        
                        <session/>
                        <entitycmp/>
                        <remoteinterface/>
                        <homeinterface/>

                        <deploymentdescriptor
                            destdir="target/meta-inf"
                        />
        
                        <jboss
                            version="3.0"
                            destdir="target/meta-inf"
                        />
                
                </ejbdoclet>
                
        <javac
            destdir="target/classes"
            classpathref="class.path"
            debug="on"
            deprecation="on"
            optimize="off"
            >

            <src path="src"/>
            <src path="target/src"/>
        </javac>

        </target>
        

        <target name="package">
                <zip destfile="target/hello.jar">
                        <zipfileset dir="target/classes"
includes="**/*.class"/>
                        <zipfileset dir="target/META-INF"
prefix="META-INF/"/>
                </zip>
        </target>

        <target name="deploy" depends="package">
                <copy file="target/hello.jar"
todir="${deploy.dir}"/>
        </target>

        <target name="undeploy">
                <delete file="${deploy.dir}/hello.jar"/>
        </target>

</project>


=============build.xml========END

 --- "Harkness, David" <[EMAIL PROTECTED]>
的訊息:> Newbie wrote:
> >             InitialContext context = new InitialContext();
> >             Object object = context.lookup("ejb/Hello");
> >             HelloHome home =
> >                     (HelloHome)PortableRemoteObject.narrow(object,
> 
> If this "client" code is running outside of your
> J2EE container (JBoss),
> you need to give the context the JNDI provider class
> and the URL for
> connecting to the JNDI service. For example, here's
> how we do it with
> WebLogic:
> 
>     Properties props = new Properties ();
>     props.put ("java.naming.factory.initial",
> "weblogic.jndi.WLInitialContextFactory");
>     props.put ("java.naming.provider.url",
> "t3://localhost:80");
>     Context ctx = new InitialContext(props);
> 
> Then you lookup the object just as you have above
> and narrow it.
> 
> David Harkness
> Sr. Software Engineer
> Sony Pictures Digital Networks
> (310) 482-4756
> 
> 
>
-------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux
> Tutorials
> Free Linux tutorial presented by Daniel Robbins,
> President and CEO of
> GenToo technologies. Learn everything from
> fundamentals to system
>
administration.http://ads.osdn.com/?ad_id70&alloc_id638&op=click
> _______________________________________________
> xdoclet-user mailing list
> [EMAIL PROTECTED]
>
https://lists.sourceforge.net/lists/listinfo/xdoclet-user 

-----------------------------------------------------------------
每天都 Yahoo!奇摩
海的顏色、風的氣息、愛你的溫度,盡在信紙底圖
http://tw.promo.yahoo.com/mail_premium/stationery.html


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to