Get from Weblogic to JBoss
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Christopher_Koenigsberg
Posted On:   Tuesday, July 1, 2003 10:05 AM

I have a webapp which deploys and runs OK in Tomcat (plus it has a main() which runs OK as a standalone app too), but won't even deploy in Weblogic. The webapp contains a JMS client, for a remote JBoss JMS queue (actually inside a Struts Action subclass). And of course the webapp also contains the JBoss JNDI Jars too. I am having trouble getting the JNDI client, in the web app, to get to the remote JBoss JNDI server, where it can find the JBoss JMS queues. I am trying to avoid having to configure anything on the Weblogic server itself, and just keep the web app self-contained so we can just deploy it anywhere (e.g. on a Weblogic server out of our control) and have it find the remote JBoss JNDI + JMS (which IS under our control).    More>>

I have a webapp which deploys and runs OK in Tomcat (plus it has a main() which runs OK as a standalone app too), but won't even deploy in Weblogic. The webapp contains a JMS client, for a remote JBoss JMS queue (actually inside a Struts Action subclass). And of course the webapp also contains the JBoss JNDI Jars too.



I am having trouble getting the JNDI client, in the web app, to get to the remote JBoss JNDI server, where it can find the JBoss JMS queues.



I am trying to avoid having to configure anything on the Weblogic server itself, and just keep the web app self-contained so we can just deploy it anywhere (e.g. on a Weblogic server out of our control) and have it find the remote JBoss JNDI + JMS (which IS under our control).



As a standalone app, it just goes to the remote JBoss JNDI for the initial context. When I got this webapp running in Tomcat, all I had to change it to do was (with the JBoss JNDI+JMS jars in the WEB-INF/lib) lookup a url of the form "jnp://remotejbosshostname:1099", in the initial context I got from Tomcat's own JNDI. (that is, first I get a usual initial context from Tomcat, then I do a lookup of the jnp: url, in it)
This returned me a NamingContext object, connected to the JNDI on the remote JBoss host, from which I could then look up the JMS queues on that same JBoss server.



But trying to deploy the same web app on Weblogic instead of Tomcat, the deployer is complaining, "unknown protocol: JNP". I even think I have removed the string "jnp:" from everywhere in the code and properties, yet it is still refusing to deploy and giving this error. That is, now I just have "remotehostname:1099" as the url I lookup in the initialcontext, but Weblogic still refuses to deploy it and still complains "unknown protocol JNP"! I suspect Weblogic's deployer is checking, and rejecting, something referring to the jnp protocol in the JBoss jar files?



I am still trying more hacks but in the meantime if anyone has done this before, can you say what to do?



I will try the Weblogic messaging bridge if absolutely necessary (meaning we'll have to set up bridge objects on the Weblogic JMS+JNDI, for all the coresponding remote JBoss JMS+JNDI objects, and use the local bridge objects), but we really don't want to have to configure anything on the Weblogic server, we really don't want to depend on its own JMS.



I am going to try using "rmi:" for the protocol maybe, instead of "jnp:"?



I have tried to get the initial context directly from the remote JBoss JNDI server, which works fine in the standalone app, but that doesn't seem to work (still won't even deploy, on Weblogic). I couldn't make that work on Tomcat, either. It seems that the containers alter the initial context factory value from the jndi.properties file, putting their own (e.g. Tomcat's for Tomcat, or Weblogic's for Weblogic) in front of the one I specified (e.g. the JBoss class from the JBoss jars).

   <<Less

Re: Get from Weblogic to JBoss

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, July 1, 2003 03:02 PM

After numerous restarts, reloads, strangeness involving cacheing (?) in the Weblogic admin "console" web app, also discovering that "deploy application" does not include deploying WAR files (which are "Web application Modules"!)... I found that I could make it work, simply by removing any protocol indicator from the front of the URL. That is, instead of "jnp://jbosshostname:1091", (which Weblogic complains about) I just use "jbosshostname:1091" in the "java.naming.provider.url".


Now, on Weblogic I even can get the InitialContext straight from the remote JBoss JNDI (this might break the setup I had working for Tomcat, but Weblogic is where this eventually has to work anyway)

About | Sitemap | Contact