You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by jbhaskaran <je...@yahoo.com> on 2016/09/16 21:38:40 UTC

Moving Away from WebLogic Confusion

Hello All,
  I am in the process of moving away from WebLogic to TomEE. I was able to
call deploy the EJBs in TomEE but can only use them remotely if I include
weblogic-ejb-jar.xml in my jar file. The only element in
weblogic-ejb-jar.xml that is not in the ejb-jar.xml is the
'<enable-call-by-reference>true</enable-call-by-reference>' element. So here
are my questions:
1. What roles does weblogic-ejb-jar.xml play in OpenEJB?
2. What can I do to remove weblogic-ejb-jar.xml from the deployment?


Thanks in advance for your help.



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Moving Away from WebLogic Confusion

Posted by jbhaskaran <je...@yahoo.com>.
What is TomEE/OpenEJB's equivalent of weblogic-ejb-jar.xml? I would rather
not modify code to add annotations. 



--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142p4680160.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Moving Away from WebLogic Confusion

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Side note: some weblo jndi names and descriptor parsing are supported,
check
https://github.com/apache/tomee/blob/4b9d8c9d221948547d49427077fcf68709a186bd/container/openejb-core/src/main/java/org/apache/openejb/config/WlsConversion.java
. We can enhance it a bit to support what would be missing too.

Le 19 sept. 2016 14:12, "Uday Gire" <ud...@managecat.com> a écrit :

> Yes, please try my suggestion and check the links for further info.
>
> > On 19 Sep 2016, at 02:50, jbhaskaran <je...@yahoo.com> wrote:
> >
> > Hello,
> > Thanks for your reply. I am using tomee 1.7.4. Does the steps you
> mentioned
> > apply to that version too?
> >
> >
> >
> >
> > --
> > View this message in context: http://tomee-openejb.979440.
> n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142p4680144.html
> > Sent from the TomEE Users mailing list archive at Nabble.com.
>
>
>

Re: Moving Away from WebLogic Confusion

Posted by Uday Gire <ud...@managecat.com>.
Yes, please try my suggestion and check the links for further info.

> On 19 Sep 2016, at 02:50, jbhaskaran <je...@yahoo.com> wrote:
> 
> Hello,
> Thanks for your reply. I am using tomee 1.7.4. Does the steps you mentioned
> apply to that version too?
> 
> 
> 
> 
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142p4680144.html
> Sent from the TomEE Users mailing list archive at Nabble.com.



Re: Moving Away from WebLogic Confusion

Posted by jbhaskaran <je...@yahoo.com>.
Hello,
 Thanks for your reply. I am using tomee 1.7.4. Does the steps you mentioned
apply to that version too?




--
View this message in context: http://tomee-openejb.979440.n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142p4680144.html
Sent from the TomEE Users mailing list archive at Nabble.com.

Re: Moving Away from WebLogic Confusion

Posted by Uday Gire <ud...@managecat.com>.
Hi 

TomEE does not use any weblogic related configuration file like weblogic-ejb-jar.xml. If you want to use EJB Bean Remote access, then you have to configure TomEE accordingly. In below, I assume that you use the latest TomEE 7.0.1 release from here, http://tomee.apache.org/downloads.html

Steps to use EJB Beans accessible from Remote Clients:

Open conf/system.properties of TomEE and set  tomee.remote.support = true
You have to configure tomee.serialization.class.blacklist and tomee.serialization.class.whitelist properties both in conf/system.properties and also in your client accessing your EJBs remotely.
For example if you have a test.IHelloWorld remote interface then add white list and black list as follows:
tomee.serialization.class.blacklist = -
tomee.serialization.class.whitelist =test.,java.,org.apache.openejb.core.ivm.IntraVmArtifact,org.apache.openejb.BeanContext$BusinessRemoteHome (We added test. as package which contains your EJB beans. Others are necessary as default.)
See this page for more information, http://tomee.apache.org/ejbd-transport.html
Add javaee-api and openejb-client jars to your client class path. These libraries are necessary to access your EJBs remotely.
Now use the Remote initial context factory to get initial context and lookup Remote Beans. Here is an example:
        Properties p = new Properties();
        p.put("java.naming.factory.initial", "org.apache.openejb.client.RemoteInitialContextFactory");
        p.put("java.naming.provider.url", "http://localhost:8080/tomee/ejb");
        
        System.setProperty("tomee.serialization.class.whitelist", "test.,java.,org.apache.openejb.BeanContext$BusinessRemoteHome,org.apache.openejb.core.ivm.IntraVmArtifact");
        System.setProperty("tomee.serialization.class.blacklist", "-");
        
        InitialContext ctx = new InitialContext(p);
        IHelloWorld instance = (IHelloWorld) ctx.lookup("java:global/ejb-testing/HelloWorld!test.IHelloWorld");
        System.out.println(instance.helloWorld() );
@Remote 
public interface IHelloworld{
…….
}

@Stateless
public HelloWorld implements IHelloWorld{
……...
}

I hope this helps.

Regards.

Uday Gire  
Senior Support Engineer, ManageCat 
p. +1 (909) - 366 – 9337
a. 340 S Lemon Ave #7996 Walnut, CA 91789
w. http://managecat.com <http://managecat.com/>
e uday.gire@managecat.com <ma...@managecat.com>
 <http://twitter.com/managecat>  <https://www.linkedin.com/company/managecat>

> On 17 Sep 2016, at 00:38, jbhaskaran <je...@yahoo.com> wrote:
> 
> Hello All,
>  I am in the process of moving away from WebLogic to TomEE. I was able to
> call deploy the EJBs in TomEE but can only use them remotely if I include
> weblogic-ejb-jar.xml in my jar file. The only element in
> weblogic-ejb-jar.xml that is not in the ejb-jar.xml is the
> '<enable-call-by-reference>true</enable-call-by-reference>' element. So here
> are my questions:
> 1. What roles does weblogic-ejb-jar.xml play in OpenEJB?
> 2. What can I do to remove weblogic-ejb-jar.xml from the deployment?
> 
> 
> Thanks in advance for your help.
> 
> 
> 
> --
> View this message in context: http://tomee-openejb.979440.n4.nabble.com/Moving-Away-from-WebLogic-Confusion-tp4680142.html
> Sent from the TomEE Users mailing list archive at Nabble.com.