-
1. Re: Configuration of JBoss/Tomcat
adrian.brock Aug 19, 2002 11:37 AM (in response to virgosys)> Hi All,
> I have developed servlets, jsp pages and ejbs (entity
> bean and session bean) in weblogic 6.1, it
>
> is working fine with bea's weblogic 6.1 application
> server.
>
> Deployment descriptors for entity bean are
> ejb-jar.xml,
> weblogic-ejb-jar.xml
> weblogic-cmp-rdbms-jar.xml
>
> Deployment descriptors for session bean are
> ejb-jar.xml,
> weblogic-ejb-jar.xml
>
>
> Now i want to execute this code in to jboss
> application server, for that
>
> I have downloaded JBoss 3.0.0 (Application server)
> and tomcat 4.0.4 separately and loaded in
>
> different folders.
> Now when i tried to access ejbs from servlet it is
> not identifying my ejbs. giving
>
> namenotfoundexception.
>
> 1)What are the deployment descriptor files to write
> for jboss..?
You can find the dtds for the descriptors
in ${jboss.home}/docs/dtd
There is some explanation in the quickstart docs
http://sourceforge.net/project/showfiles.php?group_id=22866
Somebody has provided a generic deployer.
It can convert weblogic descriptors into jboss
descriptors as you deploy the jars.
I'm not sure how complete it is.
You have to get it from CVS.
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/varia/src/resources/deployment/
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/jboss/contrib/varia/src/main/org/jboss/varia/deployment/
>
> 2)Where exactly i want to keep my ejbs in jboss..?
${jboss.home}/server/default/deploy
>
> 3)How to create stubs and skeletons in jboss..?
You don't need them.
>
> 4)How to deploy the ejbs..?
See question 2
>
> 5)What are the initial context properties for jboss?
> i have set
> Context.INITIAL_CONTEXT_FACTORY,"org.apache.naming.jav
> .javaURLContextFactory"
> and i don't no Context.PROVIDER_URL properties in
> weblogic i was using t3://192.168.0.8:7001 as
This might help you setup an external tomcat
http://www.jboss.org/modules/bb/index.html?module=bb&op=viewtopic&t=forums/
> Context.PROVIDER_URL
>
> 6) What are the xml files i need to modify in order
> to deploy the bean
>
> i have started both servers (jboss server and tomcat
> server) and placed beans jar file in
>
> E:\jboss-3.0.0\server\default\deploy folder
>
> Any help on this regard, will be appreciated
> greatly,
See question 2
If you have problems look in server\default\log\server.log
>
> Thanks in advance
> Best Wishes,
> Dinakar
Regards,
Adrian -
2. Re: Configuration of JBoss/Tomcat
virgosys Aug 20, 2002 4:14 PM (in response to virgosys)Hi Blighty
I am rephrasing my problem hope you get a better idea:
I am trying to access a simple stateless ejb from the servlet, for that, i have developed following files:
remote interface
home interface
bean implementation
&
ejb-jar.xml
jboss.xml (double checked the jndi name)
and created a jar of these files and kept in the respected folders.
Now i deployed, this jar file in - %JBOSS_HOME%\server\default\deploy,
started the jboss server, it is successfully deploying my ejb,
moving to the client side, i developed the servlet,hard coded the initial context in the serverlet.
it is as follows:
prop.setProperty("java.naming.factory.initial","org.apache.naming.java.javaURLContextFactory");
prop.setProperty("java.naming.provider.url","192.168.0.8:1099");
prop.setProperty("java.naming.factory.url.pkgs","org.jboss.naming:org.jnp.interfaces");
now, when i start the tomcat server and try to access ejb from the servlet it is throwing an exception like this.
javax.naming.NameNotFoundException: Name HelloHome is not bound in this Context
1)I have loaded tomcat in different drive an jboss in different drive...now how configure them ??? ...how to make them communicate each other???
2) is mbean, necessarily required...? how can we work without that.
Help in this regard, will appreciated greatly.
Thanks in advance,
regards,
dinakar -
3. Re: Configuration of JBoss/Tomcat
adrian.brock Aug 21, 2002 6:13 AM (in response to virgosys)Try listing the bindings from your initial context
to make sure it is actually JBoss.
for (NamingEnumeration e = ctx.list(""); e.hasMore();)
System.out.println(e.next());
Did you read the other link about configuring external
tomcat?
Does the full stack trace mention org.jnp.* classes?
Regards,
Adrian -
4. Re: Configuration of JBoss/Tomcat
virgosys Aug 21, 2002 9:13 AM (in response to virgosys)Hi Adrian,
Thanks alot for your prompt help and guidance. I really appreciate it and thanks once again.
I tried to implement your suggestion, and got a exception:
javax.naming.NameNotFoundException: Name HelloHome is not bound in this Context
I have pointed the JNDI as below:
"my jndi name-->HelloHOme"
for (NamingEnumeration e = ctx.list("HelloHome"); e.hasMore();)
System.out.println(e.next());
AWaiting for your advice,
Thanks in advance,
regards,
Dinakar -
5. Re: Configuration of JBoss/Tomcat
adrian.brock Aug 21, 2002 11:12 AM (in response to virgosys)I really did mean list("") so you get a full of list of
what is available.
Regards,
Adrian -
6. Re: Configuration of JBoss/Tomcat
virgosys Aug 22, 2002 9:42 AM (in response to virgosys)Hi Adrian,
I tried to implement your suggestion, and got no listing. it is returning--> null..?? (ctx.list("")), ok...
For your reference:
Tomcat server is using, the initial context as:
org.apache.naming.java.javaURLContextFactory
JBoss as:
org.jnp.interfaces.NamingContextFactory
1) Does it, creats any problem..?????? if so, How to resolve that.
When I tried to hardcode, the InitialContext as(org.jnp.interfaces.NamingContextFactory) in the servlet, I got InitialConextException????.
Rootexception is ClassNotFoundException (org.jnp.interfaces.NamingContextFactory)
AWaiting for your advice,
Thanks in Advance,
Regards,
Dinakar