You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by slawek <s....@gmail.com> on 2012/03/13 22:21:01 UTC

ejb from ws

Hello, 
In my learing I try to connect to examples together. First I have build
lookup-of-ejbs project and tested it - it works great. Next I prepered new
example project simple-webservice - it works fine to. But in this project I
added simpe method, where i call ejb:
public String zwrocTekstZEjb() 
	{
		String tekst="";
		 try 
		 {
			 Context context = EJBContainer.createEJBContainer().getContext();
			 Friend friend = (Friend)
context.lookup("java:global/lookup-of-ejbs/RedBean");
			 tekst="My friend " + friend.sayHello();
	     } 
		 catch (Exception e) 
		 {
	            throw new EJBException(e);
	     }
		return tekst;
	}

Unfortunetly it doesn't work. When I call ws method zwrocTekstZEjb, I got
error:
The bean encountered a non-application exception; nested exception is: 
	javax.ejb.EJBException: javax.ejb.EJBException: Provider error. No provider
definition found while invoking public abstract java.lang.String
my_package.zwrocTekstZEjb() with params [].

So I spend few hours and I haven't idea what is wrong.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4470387.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB vs JBoss

Posted by Anthony Fryer <ap...@hotmail.com>.
It would be nice to have a SecurityService that allowed you to use the
Servlet api to enforce role based security and authorization when using
openejb in *embedded* mode inside a servlet container.  

The HttpServletRequest api gives you 
  isUserInRole() 
  getRemoteUser()

The ejb SessionContext provides
  getCallerPrincipal()
  isCallerInRole()


It would be nice if the ejb session context could use the related
HttpServletRequest api methods in its implementation in cases where openejb
is embedded in a servlet container.  From not thinking about this too much,
you might need to use a ServletFilter in conjunction with a
ServletSecurityService.  I did look at this a while ago but don't have much
time to dedicate to it and it works using TomEE so wasn't a show stopper,
just a nice to have.

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4476833.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB vs JBoss

Posted by Mohammad Nour El-Din <no...@gmail.com>.
Hi

On Thu, Mar 15, 2012 at 10:18 PM, Anthony Fryer <ap...@hotmail.com> wrote:

> i come from a weblogic background having used it for years. Now days i much
> much prefer openejb/tomee. Other ejb containers are memory pigs by
> comparison, have slow boot times and are impossible to embed and use for
> unit testing. They do have more fully featured admin consoles and
> docUmentation though but i can live without that.  I have been using tomee
> in production for over a year now and am happy with the performance and
> reliability but more importantly, happy that i can run it on a debian linux
> virtual server with only 512mb of ram and have 130mb free. i couldnt even
> boot up empty instances of other containers on my server without running
> out
> of memory and that includes jboss and glassfish.  Openejb and the much
> improved ejb3 spec should regain ground lost to spring during the days of
> ejb2 and fat containers.
>

Well said about the ground lost for Spring :)


But David asked a question in this thread which is actually very important
from different users as a feedback:

- What features users would like to have besides OEJB being lightweight and
easy to use in different modes ?

I am really interested to know that from users out there.


>
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4476450.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>



-- 
Thanks
- Mohammad Nour
----
"Life is like riding a bicycle. To keep your balance you must keep moving"
- Albert Einstein

RE: OpenEJB vs JBoss

Posted by Anthony Fryer <ap...@hotmail.com>.
i come from a weblogic background having used it for years. Now days i much
much prefer openejb/tomee. Other ejb containers are memory pigs by
comparison, have slow boot times and are impossible to embed and use for
unit testing. They do have more fully featured admin consoles and
docUmentation though but i can live without that.  I have been using tomee
in production for over a year now and am happy with the performance and
reliability but more importantly, happy that i can run it on a debian linux
virtual server with only 512mb of ram and have 130mb free. i couldnt even
boot up empty instances of other containers on my server without running out
of memory and that includes jboss and glassfish.  Openejb and the much
improved ejb3 spec should regain ground lost to spring during the days of
ejb2 and fat containers.



--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4476450.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: OpenEJB vs JBoss

Posted by David Blevins <da...@gmail.com>.
Hi Matthew,

Do you have that old blog post around somewhere or mind giving some details on the scale of the system you rolled out?


-David

On Mar 15, 2012, at 11:42 AM, Jean-Louis MONTEIRO wrote:

> Some month ago, we also got a similar feedback from another user and
> company.
> Here is the article refering the user blog.
> 
> https://blogs.apache.org/openejb/entry/user_blog_openejb_rapid_j2ee
> 
> Hope it helps on the discussion.
> Jean-Louis
> 
> 2012/3/15 Neale Rudd <ne...@metawerx.net>
> 
>> Hi Markus,
>> 
>> Very impressed that you're running JEE on an embedded device with 128mb of
>> RAM!
>> 
>> Wouldn't have thought that was possible at all!
>> 
>> Best Regards,
>> Neale
>> 
>> 


Re: OpenEJB vs JBoss

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Some month ago, we also got a similar feedback from another user and
company.
Here is the article refering the user blog.

https://blogs.apache.org/openejb/entry/user_blog_openejb_rapid_j2ee

Hope it helps on the discussion.
Jean-Louis

2012/3/15 Neale Rudd <ne...@metawerx.net>

> Hi Markus,
>
> Very impressed that you're running JEE on an embedded device with 128mb of
> RAM!
>
> Wouldn't have thought that was possible at all!
>
> Best Regards,
> Neale
>
>

Re: OpenEJB vs JBoss

Posted by Neale Rudd <ne...@metawerx.net>.
Hi Markus,

Very impressed that you're running JEE on an embedded device with 128mb of 
RAM!

Wouldn't have thought that was possible at all!

Best Regards,
Neale


Re: OpenEJB vs JBoss

Posted by David Blevins <da...@gmail.com>.
Hi Markus!

Thanks for the feedback!

If there were a company with a large budget and expert engineers, what would be on the list of things you'd want to see done to make OpenEJB/TomEE a viable option?


-David


On Mar 15, 2012, at 4:01 AM, Markus Lutum wrote:

> Hi Gil.
> 
> Maybe I have a little bit another opinion on this like the core developers because I am a user :-)
> 
> At my current customer we uses Jboss since version 3.x so more than 8 years I think. Current productive system is using 4.2.3 and we currently try to migrate to JBoss 7.1 which is a big improvement.
> I think Jboss is perfect for bigger scale applications because of all the features like clustering, tons of well proven service libraries for REST, JMS, JSF or WS in general. Also the implementation of the EJB Specs are driven by the reference implementation Hibernate. Specially this has tons of "specials" if the spec does not solve detailed performance issues for example.
> But the main pro is the good documentation the very huge community and a big company behind it. Redhat wants to earn money with the supported version so they hire a lot well known experts around the world to join the implementation team.
> Once I had some special issues with the JMS Implementation 1.4.x. Via the User forum I helped a lot to find the Bugs and also had quick IRC Chats with the main lead Tim Fox. The next builds contained the bugfixes and so my problems were solved.
> 
> But I also have to tell another story PRO OpenEJB.
> A subproject needs to run on an embedded device. This has a very slow CPU and only 128 MB ram.
> Jboss and glassfish were no options because of the resources so I played with openejb (3.1.4)
> On this device I had already a java application running so to save the VM overhead I added my own starter service which starts openejb in the same vm.
> It was a little bit tricky to solve some classloader issues but currently I have my administration application (with about 20 session beans, 15 entities and some singleton services) up and running inside the embedded openejb.
> In addition to that I implemented a ZK Frontend running on a Tomcat 6 which I also start embedded on demand inside the same VM as well. This frontend then uses JNDI to connect to the openejb container.
> Works like a charm.
> This device is going live in a couple of weeks. So currently everything is stable there....
> 
> So to summarize:
> Jboss is the better container for bigger productive systems because of the power, development speed, reliability and community size.
> Openejb works perfect and for small projects I still want to use it.
> 
> And of course.... This is only my opinion
> Sorry Romain :-) You all do great jobs but without 1.000.000 $ Development Budget it's hard to win the race....
> 
> Markus Lutum
> JEE developer since decades :-)
> 
> 
> 
> 
> 
> -----Original Message-----
> From: Gil Teitelbaum [mailto:TGil@tradertools.com]
> Sent: Donnerstag, 15. März 2012 08:01
> To: users@openejb.apache.org
> Subject: OpenEJB vs JBoss
> 
> Hi,
> 
> Our company is trying to pick between JBoss and OpenEJB for a J2EE application that would use both EJB and JMS/MDBs for a production environment.
> 
> Would anyone be able to tell me the pros and cons of using one or the other?
> 
> Thanks
> 
> Gil


RE: OpenEJB vs JBoss

Posted by Markus Lutum <Ma...@nedap.com>.
Hi Gil.

Maybe I have a little bit another opinion on this like the core developers because I am a user :-)

At my current customer we uses Jboss since version 3.x so more than 8 years I think. Current productive system is using 4.2.3 and we currently try to migrate to JBoss 7.1 which is a big improvement.
I think Jboss is perfect for bigger scale applications because of all the features like clustering, tons of well proven service libraries for REST, JMS, JSF or WS in general. Also the implementation of the EJB Specs are driven by the reference implementation Hibernate. Specially this has tons of "specials" if the spec does not solve detailed performance issues for example.
But the main pro is the good documentation the very huge community and a big company behind it. Redhat wants to earn money with the supported version so they hire a lot well known experts around the world to join the implementation team.
Once I had some special issues with the JMS Implementation 1.4.x. Via the User forum I helped a lot to find the Bugs and also had quick IRC Chats with the main lead Tim Fox. The next builds contained the bugfixes and so my problems were solved.

But I also have to tell another story PRO OpenEJB.
A subproject needs to run on an embedded device. This has a very slow CPU and only 128 MB ram.
Jboss and glassfish were no options because of the resources so I played with openejb (3.1.4)
On this device I had already a java application running so to save the VM overhead I added my own starter service which starts openejb in the same vm.
It was a little bit tricky to solve some classloader issues but currently I have my administration application (with about 20 session beans, 15 entities and some singleton services) up and running inside the embedded openejb.
In addition to that I implemented a ZK Frontend running on a Tomcat 6 which I also start embedded on demand inside the same VM as well. This frontend then uses JNDI to connect to the openejb container.
Works like a charm.
This device is going live in a couple of weeks. So currently everything is stable there....

So to summarize:
Jboss is the better container for bigger productive systems because of the power, development speed, reliability and community size.
Openejb works perfect and for small projects I still want to use it.

And of course.... This is only my opinion
Sorry Romain :-) You all do great jobs but without 1.000.000 $ Development Budget it's hard to win the race....

Markus Lutum
JEE developer since decades :-)





-----Original Message-----
From: Gil Teitelbaum [mailto:TGil@tradertools.com]
Sent: Donnerstag, 15. März 2012 08:01
To: users@openejb.apache.org
Subject: OpenEJB vs JBoss

Hi,

Our company is trying to pick between JBoss and OpenEJB for a J2EE application that would use both EJB and JMS/MDBs for a production environment.

Would anyone be able to tell me the pros and cons of using one or the other?

Thanks

Gil

Re: OpenEJB vs JBoss

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Which our open configuration i think it is easy to use a distributed cache
like redis, hazelcast or infinispan to get state clustering.

- Romain

Le 16 mars 2012 18:09, "David Blevins" <da...@gmail.com> a écrit :

> On the note of clustering, we don't do state replication, but we do have
> failover / load balancing.
>
>  http://openejb.apache.org/ejb-failover.html
>
> At a high level it's your typical smart proxy approach.  Servers discover
> each other, a server list is maintained, the list is sent to the client
> when the list is update, the client selects which server to connect to via
> either sticky, round-robin, or random selection.
>
> Servers discover each other using either UDP (Multicast) or TCP
> ("Multipoint") via a stateless and orderless heartbeat.  Services are
> broadcast on that heartbeat using bonjour-like URIs.
>
> Perfect for people who want "clustering" where the real data is kept in
> the database or some external store (JMS).
>
> Some of the more recent improvements of that code based on feedback:
>
>  https://issues.apache.org/jira/browse/OPENEJB-1794
>  https://issues.apache.org/jira/browse/OPENEJB-1793
>  https://issues.apache.org/jira/browse/OPENEJB-1792
>  https://issues.apache.org/jira/browse/OPENEJB-1789
>  https://issues.apache.org/jira/browse/OPENEJB-1701
>
>
> -David
>
> On Mar 16, 2012, at 10:02 AM, Jean-Louis MONTEIRO wrote:
>
> > Hi Andy,
> >
> > Thanks for the feedback.
> > Just as a side not, we have a lot of Tomcat+OpenEJB instances running in
> > production.
> >
> > We are really happy with him and don't want to change to another
> > Application Server. We studied JBoss and we also have JBoss instances in
> > production, but we try to focus on OpenEJB.
> >
> > Andy, regarding the clustering, could you elaborate a bit more what you
> use
> > from JBoss Clustering and what you would like to have in OpenEJB?
> >
> > I'm also really interested in such a feature and would be happy to give
> it
> > a try if possible.
> >
> > Thanks again.
> > Jean-Louis
> >
> >
> > 2012/3/16 Andy <an...@orprovision.com>
> >
> >> On 15.03.2012 08:09, Gil Teitelbaum wrote:
> >>
> >>> Hi Romain,
> >>>
> >>> Thanks for your input.
> >>>
> >>> The things that I am most concerned about are performance and
> >>> reliability.  I especially worry about reliability - sometimes issues
> >>> with reliability can be hard to find.
> >>>
> >>> By the way - do you know if there any differences in running openEJB
> >>> embedded versus as part of tomcat?
> >>>
> >>> Thanks
> >>>
> >>> Gil
> >>>
> >>> -----Original Message-----
> >>> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> >>> Sent: Thursday, March 15, 2012 9:04 AM
> >>> To: users@openejb.apache.org
> >>> Subject: Re: OpenEJB vs JBoss
> >>>
> >>> Hi,
> >>>
> >>> from what i know (but i'm not so fair) JBoss seems more complicated for
> >>> a
> >>> gain i don't see. OpenEJB is simple and works very well in production.
> >>> One
> >>> cons of  OpenEJB is it is not *officially* certified for the whole JEE
> 6
> >>> stack (only webprofile) but your app should work perfectly.
> >>>
> >>> IMO you should test both (at least OpenEJB/TomEE is simple to test ;))
> >>>
> >>>
> >>>
> >>> - Romain
> >>>
> >>>
> >>> 2012/3/15 Gil Teitelbaum<TGil@tradertools.**com <TGil@tradertools.com
> >>
> >>>
> >>> Hi,
> >>>>
> >>>> Our company is trying to pick between JBoss and OpenEJB for a J2EE
> >>>> application that would use both EJB and JMS/MDBs for a production
> >>>> environment.
> >>>>
> >>>> Would anyone be able to tell me the pros and cons of using one or the
> >>>> other?
> >>>>
> >>>> Thanks
> >>>>
> >>>> Gil
> >>>>
> >>>>
> >>> Hello Gil,
> >>
> >> First some background information to paint the picture. I will focus on
> >> the OpenEJB / JBoss answer in a moment.
> >>
> >> I work for a company that is one of the worlds leading manufacturers of
> >> AOI (Automated Optical Imaging) systems. We service customers such as
> >> Nokia, Sony and Hella with full scale production line machines.
> Throughput
> >> and high availability is a necessity within the industry. These machines
> >> produce relatively large quantities of information that needs to be
> stored
> >> and run 24/7 until something breaks, which can be anything from several
> >> weeks to several months. Over the last two years we have been
> developing a
> >> new prototype machine, which includes a robust client server application
> >> based on both the standalone and embedded OpenEJB 4.x software, but also
> >> with a remote JBoss 7.x option for certain scenarios. Both client
> (Machine
> >> controller) and server are Windows 7 based.
> >>
> >> I don't want to go into overload here, so I'll try and keep this as
> >> concise as I can. Our client software must be able to operate for a
> >> reasonable amount of time should the server go down for any reason. It
> >> utilizes an embedded OpenEJB/Hibernate/Derby/**ActiveMQ stack to provide
> >> an entirely EJB based caching model that is virtually identical to an
> >> application that is deployed on a remote standalone OpenEJB server (Not
> >> TomEE), and optionally JBoss. Results that are produced by the AOI
> machine
> >> are pushed through the caching model to the remote server.  We use JMS
> both
> >> directly over TCP and locally to produce a persistent and non-persistent
> >> event model.
> >>
> >> The default server stack is OpenEJB/Hibernate/PostgreSQL/**ActiveMQ/JRE6
> >> 64bit running as a Windows service. This server may service several
> client
> >> applications (i.e.. Information produced by several machines), and
> provides
> >> a complete server EJB application per storage unit / database. In
> >> production tests we have had up to five real machines and at least ten
> >> simulated all producing data in the order of 2TB a day for periods of
> over
> >> a week. This is overkill, but represents for us an effective stress
> test.
> >> The server also has the ability to hot deploy applications. We needed
> this
> >> for dynamic database restoration and creation during runtime.
> >>
> >> We have an option to swap out the remote OpenEJB for JBoss literally
> just
> >> to be on the safe side should we require a clustering capability. As
> >> mentioned, the EJB application that we deploy on the client embedded
> >> OpenEJB is identical to the the application deployed on the remote
> OpenEJB,
> >> and 'almost' identical on JBoss. The only difference between OpenEJB and
> >> JBoss that we required were two small interfaced facilities classes that
> >> provide JNDI lookups and a custom deployment bean for each server. The
> >> deployment beans allow us to deploy and un-deploy applications on both
> >> servers, and this is unfortunately very server specific. I have to say
> that
> >> dynamic creation and deployment of an application during runtime is
> >> significantly easier in OpenEJB than JBoss.
> >>
> >> So to sum up, and of course this is just my slightly bias opinion, I
> have
> >> found OpenEJB to be completely capable in a production environment and
> the
> >> only real issue has been to think do we really need clustering at the
> >> remote EJB level. After all, we still have the option to cluster at the
> >> Hibernate/database level using PostgreSQL (Which seems to be our
> bottleneck
> >> under load). If we do then it is nice to know we have chosen a model
> that
> >> is JBoss and, with probably very little effort, other JEE application
> >> server compatible. So no real pros and cons either the way, except for
> >> clustering if it is going to be a requirement at the get go. As long as
> >> your layers are well interfaced then you can always swap things out.
> >>
> >> I hope this helps you to form a decision.
> >>
> >> Best regards,
> >>
> >> Andy Gumbrecht.
> >>
> >> --
> >> ------------------------------**------------------------------**
> >> ------------------------------**------------------------------
> >>
> >> *Andy Gumbrecht*
> >> Software Developer
> >> Orpro Vision GmbH
> >> Hefehof 24, 31785, Hameln
> >>
> >> +49 (0) 5151 809 44 21
> >> +49 (0) 1704 305 671
> >> andy.gumbrecht@orprovision.com
> >> www.orprovision.com
> >>
> >>
> >>
> >>          Orpro Vision GmbH
> >>          Sitz der Gesellschaft: 31785, Hameln
> >>          USt-Id-Nr: DE264453214
> >>          Amtsgericht Hannover HRB204336
> >>          Geschaeftsfuehrer: Roberto Gatti, Massimo Gatti, Adam Shaw
> >>
> >> ------------------------------**------------------------------**
> >> ------------------------------**------------------------------
> >>
> >>
> >>          Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> >> Informationen. Wenn Sie nicht der richtige
> >>          Adressat sind oder diese E-Mail irrtümlich erhalten haben,
> >> informieren Sie bitte sofort den Absender und
> >>          vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche
> >> anderweitige Verwendung sowie die unbefugte
> >>          Weitergabe dieser Mail ist nicht gestattet.
> >>
> >> ------------------------------**------------------------------**
> >> ------------------------------**------------------------------
> >>
> >>
> >>          This e-mail may contain confidential and/or privileged
> >> information. If you are not the intended recipient
> >>          (or have received this e-mail in error) please notify the
> sender
> >> immediately and destroy this e-mail. Any
> >>          unauthorized copying, disclosure, distribution or other use of
> >> the material or parts thereof is strictly
> >>          forbidden.
> >>
> >> ------------------------------**------------------------------**
> >> ------------------------------**------------------------------
> >>
> >>
> >>
> >>
>
>

Re: OpenEJB vs JBoss

Posted by David Blevins <da...@gmail.com>.
On the note of clustering, we don't do state replication, but we do have failover / load balancing.

  http://openejb.apache.org/ejb-failover.html

At a high level it's your typical smart proxy approach.  Servers discover each other, a server list is maintained, the list is sent to the client when the list is update, the client selects which server to connect to via either sticky, round-robin, or random selection.

Servers discover each other using either UDP (Multicast) or TCP ("Multipoint") via a stateless and orderless heartbeat.  Services are broadcast on that heartbeat using bonjour-like URIs.

Perfect for people who want "clustering" where the real data is kept in the database or some external store (JMS).

Some of the more recent improvements of that code based on feedback:

  https://issues.apache.org/jira/browse/OPENEJB-1794
  https://issues.apache.org/jira/browse/OPENEJB-1793
  https://issues.apache.org/jira/browse/OPENEJB-1792
  https://issues.apache.org/jira/browse/OPENEJB-1789
  https://issues.apache.org/jira/browse/OPENEJB-1701


-David

On Mar 16, 2012, at 10:02 AM, Jean-Louis MONTEIRO wrote:

> Hi Andy,
> 
> Thanks for the feedback.
> Just as a side not, we have a lot of Tomcat+OpenEJB instances running in
> production.
> 
> We are really happy with him and don't want to change to another
> Application Server. We studied JBoss and we also have JBoss instances in
> production, but we try to focus on OpenEJB.
> 
> Andy, regarding the clustering, could you elaborate a bit more what you use
> from JBoss Clustering and what you would like to have in OpenEJB?
> 
> I'm also really interested in such a feature and would be happy to give it
> a try if possible.
> 
> Thanks again.
> Jean-Louis
> 
> 
> 2012/3/16 Andy <an...@orprovision.com>
> 
>> On 15.03.2012 08:09, Gil Teitelbaum wrote:
>> 
>>> Hi Romain,
>>> 
>>> Thanks for your input.
>>> 
>>> The things that I am most concerned about are performance and
>>> reliability.  I especially worry about reliability - sometimes issues
>>> with reliability can be hard to find.
>>> 
>>> By the way - do you know if there any differences in running openEJB
>>> embedded versus as part of tomcat?
>>> 
>>> Thanks
>>> 
>>> Gil
>>> 
>>> -----Original Message-----
>>> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>>> Sent: Thursday, March 15, 2012 9:04 AM
>>> To: users@openejb.apache.org
>>> Subject: Re: OpenEJB vs JBoss
>>> 
>>> Hi,
>>> 
>>> from what i know (but i'm not so fair) JBoss seems more complicated for
>>> a
>>> gain i don't see. OpenEJB is simple and works very well in production.
>>> One
>>> cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
>>> stack (only webprofile) but your app should work perfectly.
>>> 
>>> IMO you should test both (at least OpenEJB/TomEE is simple to test ;))
>>> 
>>> 
>>> 
>>> - Romain
>>> 
>>> 
>>> 2012/3/15 Gil Teitelbaum<TGil@tradertools.**com <TG...@tradertools.com>>
>>> 
>>> Hi,
>>>> 
>>>> Our company is trying to pick between JBoss and OpenEJB for a J2EE
>>>> application that would use both EJB and JMS/MDBs for a production
>>>> environment.
>>>> 
>>>> Would anyone be able to tell me the pros and cons of using one or the
>>>> other?
>>>> 
>>>> Thanks
>>>> 
>>>> Gil
>>>> 
>>>> 
>>> Hello Gil,
>> 
>> First some background information to paint the picture. I will focus on
>> the OpenEJB / JBoss answer in a moment.
>> 
>> I work for a company that is one of the worlds leading manufacturers of
>> AOI (Automated Optical Imaging) systems. We service customers such as
>> Nokia, Sony and Hella with full scale production line machines. Throughput
>> and high availability is a necessity within the industry. These machines
>> produce relatively large quantities of information that needs to be stored
>> and run 24/7 until something breaks, which can be anything from several
>> weeks to several months. Over the last two years we have been developing a
>> new prototype machine, which includes a robust client server application
>> based on both the standalone and embedded OpenEJB 4.x software, but also
>> with a remote JBoss 7.x option for certain scenarios. Both client (Machine
>> controller) and server are Windows 7 based.
>> 
>> I don't want to go into overload here, so I'll try and keep this as
>> concise as I can. Our client software must be able to operate for a
>> reasonable amount of time should the server go down for any reason. It
>> utilizes an embedded OpenEJB/Hibernate/Derby/**ActiveMQ stack to provide
>> an entirely EJB based caching model that is virtually identical to an
>> application that is deployed on a remote standalone OpenEJB server (Not
>> TomEE), and optionally JBoss. Results that are produced by the AOI machine
>> are pushed through the caching model to the remote server.  We use JMS both
>> directly over TCP and locally to produce a persistent and non-persistent
>> event model.
>> 
>> The default server stack is OpenEJB/Hibernate/PostgreSQL/**ActiveMQ/JRE6
>> 64bit running as a Windows service. This server may service several client
>> applications (i.e.. Information produced by several machines), and provides
>> a complete server EJB application per storage unit / database. In
>> production tests we have had up to five real machines and at least ten
>> simulated all producing data in the order of 2TB a day for periods of over
>> a week. This is overkill, but represents for us an effective stress test.
>> The server also has the ability to hot deploy applications. We needed this
>> for dynamic database restoration and creation during runtime.
>> 
>> We have an option to swap out the remote OpenEJB for JBoss literally just
>> to be on the safe side should we require a clustering capability. As
>> mentioned, the EJB application that we deploy on the client embedded
>> OpenEJB is identical to the the application deployed on the remote OpenEJB,
>> and 'almost' identical on JBoss. The only difference between OpenEJB and
>> JBoss that we required were two small interfaced facilities classes that
>> provide JNDI lookups and a custom deployment bean for each server. The
>> deployment beans allow us to deploy and un-deploy applications on both
>> servers, and this is unfortunately very server specific. I have to say that
>> dynamic creation and deployment of an application during runtime is
>> significantly easier in OpenEJB than JBoss.
>> 
>> So to sum up, and of course this is just my slightly bias opinion, I have
>> found OpenEJB to be completely capable in a production environment and the
>> only real issue has been to think do we really need clustering at the
>> remote EJB level. After all, we still have the option to cluster at the
>> Hibernate/database level using PostgreSQL (Which seems to be our bottleneck
>> under load). If we do then it is nice to know we have chosen a model that
>> is JBoss and, with probably very little effort, other JEE application
>> server compatible. So no real pros and cons either the way, except for
>> clustering if it is going to be a requirement at the get go. As long as
>> your layers are well interfaced then you can always swap things out.
>> 
>> I hope this helps you to form a decision.
>> 
>> Best regards,
>> 
>> Andy Gumbrecht.
>> 
>> --
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------
>> 
>> *Andy Gumbrecht*
>> Software Developer
>> Orpro Vision GmbH
>> Hefehof 24, 31785, Hameln
>> 
>> +49 (0) 5151 809 44 21
>> +49 (0) 1704 305 671
>> andy.gumbrecht@orprovision.com
>> www.orprovision.com
>> 
>> 
>> 
>>          Orpro Vision GmbH
>>          Sitz der Gesellschaft: 31785, Hameln
>>          USt-Id-Nr: DE264453214
>>          Amtsgericht Hannover HRB204336
>>          Geschaeftsfuehrer: Roberto Gatti, Massimo Gatti, Adam Shaw
>> 
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------
>> 
>> 
>>          Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
>> Informationen. Wenn Sie nicht der richtige
>>          Adressat sind oder diese E-Mail irrtümlich erhalten haben,
>> informieren Sie bitte sofort den Absender und
>>          vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche
>> anderweitige Verwendung sowie die unbefugte
>>          Weitergabe dieser Mail ist nicht gestattet.
>> 
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------
>> 
>> 
>>          This e-mail may contain confidential and/or privileged
>> information. If you are not the intended recipient
>>          (or have received this e-mail in error) please notify the sender
>> immediately and destroy this e-mail. Any
>>          unauthorized copying, disclosure, distribution or other use of
>> the material or parts thereof is strictly
>>          forbidden.
>> 
>> ------------------------------**------------------------------**
>> ------------------------------**------------------------------
>> 
>> 
>> 
>> 


Re: OpenEJB vs JBoss

Posted by Jean-Louis MONTEIRO <je...@gmail.com>.
Hi Andy,

Thanks for the feedback.
Just as a side not, we have a lot of Tomcat+OpenEJB instances running in
production.

We are really happy with him and don't want to change to another
Application Server. We studied JBoss and we also have JBoss instances in
production, but we try to focus on OpenEJB.

Andy, regarding the clustering, could you elaborate a bit more what you use
from JBoss Clustering and what you would like to have in OpenEJB?

I'm also really interested in such a feature and would be happy to give it
a try if possible.

Thanks again.
Jean-Louis


2012/3/16 Andy <an...@orprovision.com>

> On 15.03.2012 08:09, Gil Teitelbaum wrote:
>
>> Hi Romain,
>>
>> Thanks for your input.
>>
>> The things that I am most concerned about are performance and
>> reliability.  I especially worry about reliability - sometimes issues
>> with reliability can be hard to find.
>>
>> By the way - do you know if there any differences in running openEJB
>> embedded versus as part of tomcat?
>>
>> Thanks
>>
>> Gil
>>
>> -----Original Message-----
>> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
>> Sent: Thursday, March 15, 2012 9:04 AM
>> To: users@openejb.apache.org
>> Subject: Re: OpenEJB vs JBoss
>>
>> Hi,
>>
>> from what i know (but i'm not so fair) JBoss seems more complicated for
>> a
>> gain i don't see. OpenEJB is simple and works very well in production.
>> One
>> cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
>> stack (only webprofile) but your app should work perfectly.
>>
>> IMO you should test both (at least OpenEJB/TomEE is simple to test ;))
>>
>>
>>
>> - Romain
>>
>>
>> 2012/3/15 Gil Teitelbaum<TGil@tradertools.**com <TG...@tradertools.com>>
>>
>>  Hi,
>>>
>>> Our company is trying to pick between JBoss and OpenEJB for a J2EE
>>> application that would use both EJB and JMS/MDBs for a production
>>> environment.
>>>
>>> Would anyone be able to tell me the pros and cons of using one or the
>>> other?
>>>
>>> Thanks
>>>
>>> Gil
>>>
>>>
>>  Hello Gil,
>
> First some background information to paint the picture. I will focus on
> the OpenEJB / JBoss answer in a moment.
>
> I work for a company that is one of the worlds leading manufacturers of
> AOI (Automated Optical Imaging) systems. We service customers such as
> Nokia, Sony and Hella with full scale production line machines. Throughput
> and high availability is a necessity within the industry. These machines
> produce relatively large quantities of information that needs to be stored
> and run 24/7 until something breaks, which can be anything from several
> weeks to several months. Over the last two years we have been developing a
> new prototype machine, which includes a robust client server application
> based on both the standalone and embedded OpenEJB 4.x software, but also
> with a remote JBoss 7.x option for certain scenarios. Both client (Machine
> controller) and server are Windows 7 based.
>
> I don't want to go into overload here, so I'll try and keep this as
> concise as I can. Our client software must be able to operate for a
> reasonable amount of time should the server go down for any reason. It
> utilizes an embedded OpenEJB/Hibernate/Derby/**ActiveMQ stack to provide
> an entirely EJB based caching model that is virtually identical to an
> application that is deployed on a remote standalone OpenEJB server (Not
> TomEE), and optionally JBoss. Results that are produced by the AOI machine
> are pushed through the caching model to the remote server.  We use JMS both
> directly over TCP and locally to produce a persistent and non-persistent
> event model.
>
> The default server stack is OpenEJB/Hibernate/PostgreSQL/**ActiveMQ/JRE6
> 64bit running as a Windows service. This server may service several client
> applications (i.e.. Information produced by several machines), and provides
> a complete server EJB application per storage unit / database. In
> production tests we have had up to five real machines and at least ten
> simulated all producing data in the order of 2TB a day for periods of over
> a week. This is overkill, but represents for us an effective stress test.
> The server also has the ability to hot deploy applications. We needed this
> for dynamic database restoration and creation during runtime.
>
> We have an option to swap out the remote OpenEJB for JBoss literally just
> to be on the safe side should we require a clustering capability. As
> mentioned, the EJB application that we deploy on the client embedded
> OpenEJB is identical to the the application deployed on the remote OpenEJB,
> and 'almost' identical on JBoss. The only difference between OpenEJB and
> JBoss that we required were two small interfaced facilities classes that
> provide JNDI lookups and a custom deployment bean for each server. The
> deployment beans allow us to deploy and un-deploy applications on both
> servers, and this is unfortunately very server specific. I have to say that
> dynamic creation and deployment of an application during runtime is
> significantly easier in OpenEJB than JBoss.
>
> So to sum up, and of course this is just my slightly bias opinion, I have
> found OpenEJB to be completely capable in a production environment and the
> only real issue has been to think do we really need clustering at the
> remote EJB level. After all, we still have the option to cluster at the
> Hibernate/database level using PostgreSQL (Which seems to be our bottleneck
> under load). If we do then it is nice to know we have chosen a model that
> is JBoss and, with probably very little effort, other JEE application
> server compatible. So no real pros and cons either the way, except for
> clustering if it is going to be a requirement at the get go. As long as
> your layers are well interfaced then you can always swap things out.
>
> I hope this helps you to form a decision.
>
> Best regards,
>
> Andy Gumbrecht.
>
> --
> ------------------------------**------------------------------**
> ------------------------------**------------------------------
>
> *Andy Gumbrecht*
> Software Developer
> Orpro Vision GmbH
> Hefehof 24, 31785, Hameln
>
> +49 (0) 5151 809 44 21
> +49 (0) 1704 305 671
> andy.gumbrecht@orprovision.com
> www.orprovision.com
>
>
>
>           Orpro Vision GmbH
>           Sitz der Gesellschaft: 31785, Hameln
>           USt-Id-Nr: DE264453214
>           Amtsgericht Hannover HRB204336
>           Geschaeftsfuehrer: Roberto Gatti, Massimo Gatti, Adam Shaw
>
> ------------------------------**------------------------------**
> ------------------------------**------------------------------
>
>
>           Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte
> Informationen. Wenn Sie nicht der richtige
>           Adressat sind oder diese E-Mail irrtümlich erhalten haben,
> informieren Sie bitte sofort den Absender und
>           vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche
> anderweitige Verwendung sowie die unbefugte
>           Weitergabe dieser Mail ist nicht gestattet.
>
> ------------------------------**------------------------------**
> ------------------------------**------------------------------
>
>
>           This e-mail may contain confidential and/or privileged
> information. If you are not the intended recipient
>           (or have received this e-mail in error) please notify the sender
> immediately and destroy this e-mail. Any
>           unauthorized copying, disclosure, distribution or other use of
> the material or parts thereof is strictly
>           forbidden.
>
> ------------------------------**------------------------------**
> ------------------------------**------------------------------
>
>
>
>

Re: OpenEJB vs JBoss

Posted by Andy <an...@orprovision.com>.
On 15.03.2012 08:09, Gil Teitelbaum wrote:
> Hi Romain,
>
> Thanks for your input.
>
> The things that I am most concerned about are performance and
> reliability.  I especially worry about reliability - sometimes issues
> with reliability can be hard to find.
>
> By the way - do you know if there any differences in running openEJB
> embedded versus as part of tomcat?
>
> Thanks
>
> Gil
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: Thursday, March 15, 2012 9:04 AM
> To: users@openejb.apache.org
> Subject: Re: OpenEJB vs JBoss
>
> Hi,
>
> from what i know (but i'm not so fair) JBoss seems more complicated for
> a
> gain i don't see. OpenEJB is simple and works very well in production.
> One
> cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
> stack (only webprofile) but your app should work perfectly.
>
> IMO you should test both (at least OpenEJB/TomEE is simple to test ;))
>
>
>
> - Romain
>
>
> 2012/3/15 Gil Teitelbaum<TG...@tradertools.com>
>
>> Hi,
>>
>> Our company is trying to pick between JBoss and OpenEJB for a J2EE
>> application that would use both EJB and JMS/MDBs for a production
>> environment.
>>
>> Would anyone be able to tell me the pros and cons of using one or the
>> other?
>>
>> Thanks
>>
>> Gil
>>
>
Hello Gil,

First some background information to paint the picture. I will focus on the OpenEJB / JBoss answer in a moment.

I work for a company that is one of the worlds leading manufacturers of AOI (Automated Optical Imaging) systems. We 
service customers such as Nokia, Sony and Hella with full scale production line machines. Throughput and high 
availability is a necessity within the industry. These machines produce relatively large quantities of information that 
needs to be stored and run 24/7 until something breaks, which can be anything from several weeks to several months. Over 
the last two years we have been developing a new prototype machine, which includes a robust client server application 
based on both the standalone and embedded OpenEJB 4.x software, but also with a remote JBoss 7.x option for certain 
scenarios. Both client (Machine controller) and server are Windows 7 based.

I don't want to go into overload here, so I'll try and keep this as concise as I can. Our client software must be able 
to operate for a reasonable amount of time should the server go down for any reason. It utilizes an embedded 
OpenEJB/Hibernate/Derby/ActiveMQ stack to provide an entirely EJB based caching model that is virtually identical to an 
application that is deployed on a remote standalone OpenEJB server (Not TomEE), and optionally JBoss. Results that are 
produced by the AOI machine are pushed through the caching model to the remote server.  We use JMS both directly over 
TCP and locally to produce a persistent and non-persistent event model.

The default server stack is OpenEJB/Hibernate/PostgreSQL/ActiveMQ/JRE6 64bit running as a Windows service. This server 
may service several client applications (i.e.. Information produced by several machines), and provides a complete server 
EJB application per storage unit / database. In production tests we have had up to five real machines and at least ten 
simulated all producing data in the order of 2TB a day for periods of over a week. This is overkill, but represents for 
us an effective stress test. The server also has the ability to hot deploy applications. We needed this for dynamic 
database restoration and creation during runtime.

We have an option to swap out the remote OpenEJB for JBoss literally just to be on the safe side should we require a 
clustering capability. As mentioned, the EJB application that we deploy on the client embedded OpenEJB is identical to 
the the application deployed on the remote OpenEJB, and 'almost' identical on JBoss. The only difference between OpenEJB 
and JBoss that we required were two small interfaced facilities classes that provide JNDI lookups and a custom 
deployment bean for each server. The deployment beans allow us to deploy and un-deploy applications on both servers, and 
this is unfortunately very server specific. I have to say that dynamic creation and deployment of an application during 
runtime is significantly easier in OpenEJB than JBoss.

So to sum up, and of course this is just my slightly bias opinion, I have found OpenEJB to be completely capable in a 
production environment and the only real issue has been to think do we really need clustering at the remote EJB level. 
After all, we still have the option to cluster at the Hibernate/database level using PostgreSQL (Which seems to be our 
bottleneck under load). If we do then it is nice to know we have chosen a model that is JBoss and, with probably very 
little effort, other JEE application server compatible. So no real pros and cons either the way, except for clustering 
if it is going to be a requirement at the get go. As long as your layers are well interfaced then you can always swap 
things out.

I hope this helps you to form a decision.

Best regards,

Andy Gumbrecht.

-- 
------------------------------------------------------------------------------------------------------------------------

*Andy Gumbrecht*
Software Developer
Orpro Vision GmbH
Hefehof 24, 31785, Hameln

+49 (0) 5151 809 44 21
+49 (0) 1704 305 671
andy.gumbrecht@orprovision.com
www.orprovision.com



            Orpro Vision GmbH
            Sitz der Gesellschaft: 31785, Hameln
            USt-Id-Nr: DE264453214
            Amtsgericht Hannover HRB204336
            Geschaeftsfuehrer: Roberto Gatti, Massimo Gatti, Adam Shaw

------------------------------------------------------------------------------------------------------------------------


            Diese E-Mail enthält vertrauliche und/oder rechtlich geschützte Informationen. Wenn Sie nicht der richtige
            Adressat sind oder diese E-Mail irrtümlich erhalten haben, informieren Sie bitte sofort den Absender und
            vernichten Sie diese Mail. Das unerlaubte Kopieren, jegliche anderweitige Verwendung sowie die unbefugte
            Weitergabe dieser Mail ist nicht gestattet.

------------------------------------------------------------------------------------------------------------------------


            This e-mail may contain confidential and/or privileged information. If you are not the intended recipient
            (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any
            unauthorized copying, disclosure, distribution or other use of the material or parts thereof is strictly
            forbidden.

------------------------------------------------------------------------------------------------------------------------




Re: OpenEJB vs JBoss

Posted by Romain Manni-Bucau <rm...@gmail.com>.
There are differences but we try to make them as small as possible (we even
managed a way to simulate webapp context in standalone to get close url in
both environments).

To summarrize the differenec let say in standalone you dont have a webapp
context.

Maybe you can give us some more inputs regarding your requirements?

- Romain


2012/3/15 Gil Teitelbaum <TG...@tradertools.com>

> Hi Romain,
>
> Thanks for your input.
>
> The things that I am most concerned about are performance and
> reliability.  I especially worry about reliability - sometimes issues
> with reliability can be hard to find.
>
> By the way - do you know if there any differences in running openEJB
> embedded versus as part of tomcat?
>
> Thanks
>
> Gil
>
> -----Original Message-----
> From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com]
> Sent: Thursday, March 15, 2012 9:04 AM
> To: users@openejb.apache.org
> Subject: Re: OpenEJB vs JBoss
>
> Hi,
>
> from what i know (but i'm not so fair) JBoss seems more complicated for
> a
> gain i don't see. OpenEJB is simple and works very well in production.
> One
> cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
> stack (only webprofile) but your app should work perfectly.
>
> IMO you should test both (at least OpenEJB/TomEE is simple to test ;))
>
>
>
> - Romain
>
>
> 2012/3/15 Gil Teitelbaum <TG...@tradertools.com>
>
> > Hi,
> >
> > Our company is trying to pick between JBoss and OpenEJB for a J2EE
> > application that would use both EJB and JMS/MDBs for a production
> > environment.
> >
> > Would anyone be able to tell me the pros and cons of using one or the
> > other?
> >
> > Thanks
> >
> > Gil
> >
>

RE: OpenEJB vs JBoss

Posted by Gil Teitelbaum <TG...@tradertools.com>.
Hi Romain,

Thanks for your input.

The things that I am most concerned about are performance and
reliability.  I especially worry about reliability - sometimes issues
with reliability can be hard to find.

By the way - do you know if there any differences in running openEJB
embedded versus as part of tomcat?

Thanks

Gil

-----Original Message-----
From: Romain Manni-Bucau [mailto:rmannibucau@gmail.com] 
Sent: Thursday, March 15, 2012 9:04 AM
To: users@openejb.apache.org
Subject: Re: OpenEJB vs JBoss

Hi,

from what i know (but i'm not so fair) JBoss seems more complicated for
a
gain i don't see. OpenEJB is simple and works very well in production.
One
cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
stack (only webprofile) but your app should work perfectly.

IMO you should test both (at least OpenEJB/TomEE is simple to test ;))



- Romain


2012/3/15 Gil Teitelbaum <TG...@tradertools.com>

> Hi,
>
> Our company is trying to pick between JBoss and OpenEJB for a J2EE
> application that would use both EJB and JMS/MDBs for a production
> environment.
>
> Would anyone be able to tell me the pros and cons of using one or the
> other?
>
> Thanks
>
> Gil
>

Re: OpenEJB vs JBoss

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

from what i know (but i'm not so fair) JBoss seems more complicated for a
gain i don't see. OpenEJB is simple and works very well in production. One
cons of  OpenEJB is it is not *officially* certified for the whole JEE 6
stack (only webprofile) but your app should work perfectly.

IMO you should test both (at least OpenEJB/TomEE is simple to test ;))



- Romain


2012/3/15 Gil Teitelbaum <TG...@tradertools.com>

> Hi,
>
> Our company is trying to pick between JBoss and OpenEJB for a J2EE
> application that would use both EJB and JMS/MDBs for a production
> environment.
>
> Would anyone be able to tell me the pros and cons of using one or the
> other?
>
> Thanks
>
> Gil
>

OpenEJB vs JBoss

Posted by Gil Teitelbaum <TG...@tradertools.com>.
Hi,

Our company is trying to pick between JBoss and OpenEJB for a J2EE
application that would use both EJB and JMS/MDBs for a production
environment.

Would anyone be able to tell me the pros and cons of using one or the
other?

Thanks

Gil

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello,

Thank you Romain for help and all answers. I see that  I have to read more
about jee.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4493581.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
that's not an issue regarding the lookup or the ejb path. You simply don't
provide the intrface in the wclient webapp so you can't invoke the remote
ejb.

- Romain


2012/3/21 slawek <s....@gmail.com>

> Great.
> I know about this problem in zwrocTekstZEjb method - path is not set. But
> ejb is call correctly in this method, so problem is in zwrocTekstZEjb2.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4491596.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Great.
I know about this problem in zwrocTekstZEjb method - path is not set. But
ejb is call correctly in this method, so problem is in zwrocTekstZEjb2.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4491596.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
ok,

i managed to run it.


you need the Pogoda class in your client, the real exception is:

Caused by: java.lang.ClassNotFoundException: eu.wojciechowscy.Pogoda

- Romain


2012/3/20 Romain Manni-Bucau <rm...@gmail.com>

> did you try name "PogodaImplRemote" ?
>
> well i'm sure remote lookup works since we use it everyday. It should be a
> name/initial context config issue.
>
> - Romain
>
>
>
> 2012/3/20 slawek <s....@gmail.com>
>
>> Hello,
>>
>> I don't know easy way to convert eclipse project to maven.
>>
>> Best Regards
>> sw
>>
>> --
>> View this message in context:
>> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4490123.html
>> Sent from the OpenEJB User mailing list archive at Nabble.com.
>>
>
>

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you try name "PogodaImplRemote" ?

well i'm sure remote lookup works since we use it everyday. It should be a
name/initial context config issue.

- Romain


2012/3/20 slawek <s....@gmail.com>

> Hello,
>
> I don't know easy way to convert eclipse project to maven.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4490123.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello,

I don't know easy way to convert eclipse project to maven.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4490123.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Can you convert your project in maven ones please?

Le 20 mars 2012 19:23, "slawek" <s....@gmail.com> a écrit :

> So, i my expample this properties doesn't work....
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4489861.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
So, i my expample this properties doesn't work....

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4489861.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
I think i get it,

you need these properties in your lookup:

p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.client.RemoteInitialContextFactory");
p.put(Context.PROVIDER_URL, "http://localhost:8080/openejb/ejbd"); //
note: in next versions "openejb" is replaced by "tomee"


- Romain


2012/3/20 slawek <s....@gmail.com>

> Hello Romain,
>
> I have compressed to zi[ archive my two test projects:
> - ejb_ejb - is a simple ejb project
> - ejb_ws_2 is a simple web service, which try to return via webservice
> inforomation from ejb_ejb. There are few method but core problem i have
> tested in zwrocTekstZEjb2 and zwrocTekstZEjb3.
>
> You can download eclipse projects from
> http://iem.pw.edu.pl/~wojciecs/projects.zip
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4487737.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello Romain,

I have compressed to zi[ archive my two test projects:
- ejb_ejb - is a simple ejb project
- ejb_ws_2 is a simple web service, which try to return via webservice
inforomation from ejb_ejb. There are few method but core problem i have
tested in zwrocTekstZEjb2 and zwrocTekstZEjb3.

You can download eclipse projects from
http://iem.pw.edu.pl/~wojciecs/projects.zip

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4487737.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
sorry i think i miss sthg regarding what you do.

can you share the whole webapps with a readme to explain how to test
please? (sthg ready to run would be appreciated)

- Romain


2012/3/19 slawek <s....@gmail.com>

> Hello,
> Unfortunetly it doesn't help...
>
> Best regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4485978.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello,
Unfortunetly it doesn't help...

Best regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4485978.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
so i think you should use the
org.apache.openejb.client.RemoteInitialContextFactory as INITIAL_CONTEXT_
FACTORY
- Romain


2012/3/19 slawek <s....@gmail.com>

> yes.
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4484106.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
yes.

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4484106.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
is your ejb interface annotated @Remote?

- Romain


2012/3/19 slawek <s....@gmail.com>

> Yes, I have try  lookup("java:global/localhost/ejb_ejb/RedBean") - but it
> is
> inconrrect.Tomee generate error: javax.ejb.EJBException:
> javax.naming.NameNotFoundException. So mayby I should set some specific
> properties.
>
> Best regards
> sw
>
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4483964.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Yes, I have try  lookup("java:global/localhost/ejb_ejb/RedBean") - but it is
inconrrect.Tomee generate error: javax.ejb.EJBException:
javax.naming.NameNotFoundException. So mayby I should set some specific
properties.

Best regards
sw


--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4483964.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

did you try lookup("java:global/localhost/ejb_ejb/RedBean") ?

i could be wring since i say it without checking but 'localhost/ejb_ejb' is
the name we use for your webapp because you didn't configure it. You should
be able to replace it specifying a custom ejb module name.

- Romain


2012/3/18 slawek <s....@gmail.com>

> Hello,
>
> Welcome after weekend break. I call ejb from ws like:
> @Override
>        public String zwrocTekstZEjb2()
>        {
>                String wynik="";
>
>                Properties p = new Properties();
>                p.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.apache.openejb.core.LocalInitialContextFactory");
>                p.put("openejb.loader", "embed");
>
>                 try
>                 {
>                                Context ctx = new InitialContext(p);
>                                 Object object= ctx.lookup("RedBeanLocal");
>                                wynik=object.toString();
>              }
>                 catch (Exception e)
>                 {
>                    throw new EJBException(e);
>             }
>                 return wynik;
>        }
>
> Additionaly i would like to call ejb via jdni, so i thing important part of
> log is:
>
> 2012-03-18 22:15:54,004 - INFO  - Jndi(name=BlueBeanLocal) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,004 - INFO  - Jndi(name=BlueBeanLocal) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/BlueBean!eu.wojciechowscy.Friend) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/BlueBean!eu.wojciechowscy.Friend) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/BlueBean) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/BlueBean) -->
> Ejb(deployment-id=BlueBean)
> 2012-03-18 22:15:54,005 - INFO  - Jndi(name=RedBeanLocal) -->
> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,005 - INFO  - Jndi(name=RedBeanLocal) -->
> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/RedBean!eu.wojciechowscy.Friend) -->
> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,005 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/RedBean!eu.wojciechowscy.Friend) -->
> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,006 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/RedBean) --> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,006 - INFO  -
> Jndi(name=global/localhost/ejb_ejb/RedBean) --> Ejb(deployment-id=RedBean)
> 2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=RedBean,
> ejb-name=RedBean, container=My Stateless Container)
> 2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=RedBean,
> ejb-name=RedBean, container=My Stateless Container)
> 2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=BlueBean,
> ejb-name=BlueBean, container=My Stateless Container)
> 2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=BlueBean,
> ejb-name=BlueBean, container=My Stateless Container)
> 2012-03-18 22:15:54,033 - INFO  - Started Ejb(deployment-id=RedBean,
> ejb-name=RedBean, container=My Stateless Container)
> 2012-03-18 22:15:54,033 - INFO  - Started Ejb(deployment-id=RedBean,
> ejb-name=RedBean, container=My Stateless Container)
> 2012-03-18 22:15:54,049 - INFO  - Started Ejb(deployment-id=BlueBean,
> ejb-name=BlueBean, container=My Stateless Container)
> 2012-03-18 22:15:54,049 - INFO  - Started Ejb(deployment-id=BlueBean,
> ejb-name=BlueBean, container=My Stateless Container)
> 2012-03-18 22:15:54,050 - INFO  - Deployed
>
> Application(path=E:\soft\tomcat\apache-tomee-plus-1.0.0-beta-2\wtpwebapps\ejb_ejb)
> 2012-03-18 22:15:54,050 - INFO  - Deployed
>
> Application(path=E:\soft\tomcat\apache-tomee-plus-1.0.0-beta-2\wtpwebapps\ejb_ejb)
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4483003.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello, 

Welcome after weekend break. I call ejb from ws like:
@Override
	public String zwrocTekstZEjb2() 
	{
		String wynik="";
		
		Properties p = new Properties();
		p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.core.LocalInitialContextFactory");
		p.put("openejb.loader", "embed");
		
		 try 
		 {
				Context ctx = new InitialContext(p);
				Object object= ctx.lookup("RedBeanLocal");
				wynik=object.toString();
	     } 
		 catch (Exception e) 
		 {
	            throw new EJBException(e);
	     }
		return wynik;
	}

Additionaly i would like to call ejb via jdni, so i thing important part of
log is:

2012-03-18 22:15:54,004 - INFO  - Jndi(name=BlueBeanLocal) -->
Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,004 - INFO  - Jndi(name=BlueBeanLocal) -->
Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/BlueBean!eu.wojciechowscy.Friend) -->
Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/BlueBean!eu.wojciechowscy.Friend) -->
Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/BlueBean) --> Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/BlueBean) --> Ejb(deployment-id=BlueBean)
2012-03-18 22:15:54,005 - INFO  - Jndi(name=RedBeanLocal) -->
Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,005 - INFO  - Jndi(name=RedBeanLocal) -->
Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/RedBean!eu.wojciechowscy.Friend) -->
Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,005 - INFO  -
Jndi(name=global/localhost/ejb_ejb/RedBean!eu.wojciechowscy.Friend) -->
Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,006 - INFO  -
Jndi(name=global/localhost/ejb_ejb/RedBean) --> Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,006 - INFO  -
Jndi(name=global/localhost/ejb_ejb/RedBean) --> Ejb(deployment-id=RedBean)
2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=RedBean,
ejb-name=RedBean, container=My Stateless Container)
2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=RedBean,
ejb-name=RedBean, container=My Stateless Container)
2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=BlueBean,
ejb-name=BlueBean, container=My Stateless Container)
2012-03-18 22:15:54,015 - INFO  - Created Ejb(deployment-id=BlueBean,
ejb-name=BlueBean, container=My Stateless Container)
2012-03-18 22:15:54,033 - INFO  - Started Ejb(deployment-id=RedBean,
ejb-name=RedBean, container=My Stateless Container)
2012-03-18 22:15:54,033 - INFO  - Started Ejb(deployment-id=RedBean,
ejb-name=RedBean, container=My Stateless Container)
2012-03-18 22:15:54,049 - INFO  - Started Ejb(deployment-id=BlueBean,
ejb-name=BlueBean, container=My Stateless Container)
2012-03-18 22:15:54,049 - INFO  - Started Ejb(deployment-id=BlueBean,
ejb-name=BlueBean, container=My Stateless Container)
2012-03-18 22:15:54,050 - INFO  - Deployed
Application(path=E:\soft\tomcat\apache-tomee-plus-1.0.0-beta-2\wtpwebapps\ejb_ejb)
2012-03-18 22:15:54,050 - INFO  - Deployed
Application(path=E:\soft\tomcat\apache-tomee-plus-1.0.0-beta-2\wtpwebapps\ejb_ejb)

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4483003.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

if you paste your logs and the lookup you did i think we can manage to make
java:global working

- Romain


2012/3/15 slawek <s....@gmail.com>

> Hello,
>
> The problem is solved. I call ejb from other application using code:
> Properties p = new Properties();
>                p.put(Context.INITIAL_CONTEXT_FACTORY,
> "org.apache.openejb.core.LocalInitialContextFactory");
>                p.put("openejb.loader", "embed");
>
>                 try
>                 {
>                                Context ctx = new InitialContext(p);
>                                Friend friend = (Friend)
> ctx.lookup("RedBeanLocal");
>                                wynik=friend.sayHello();
>              }
>                 catch (Exception e)
>                 {
>                    throw new EJBException(e);
>             }
> The main problem was to set properties and put it to IndexContext
> constructor. It works, but still i can't call ejb using java:global.....
> syntax.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4475747.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Hello, 

The problem is solved. I call ejb from other application using code:
Properties p = new Properties();
		p.put(Context.INITIAL_CONTEXT_FACTORY,
"org.apache.openejb.core.LocalInitialContextFactory");
		p.put("openejb.loader", "embed");
		
		 try 
		 {
				Context ctx = new InitialContext(p);
				Friend friend = (Friend) ctx.lookup("RedBeanLocal");
				wynik=friend.sayHello();
	     } 
		 catch (Exception e) 
		 {
	            throw new EJBException(e);
	     }
The main problem was to set properties and put it to IndexContext
constructor. It works, but still i can't call ejb using java:global.....
syntax.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4475747.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
the standard convention should work. But you can check the name used at
deploy time in the log.

simply start you server with your app, let it fail but look lines like
"Jndi(XXXX".

- Romain


2012/3/14 slawek <s....@gmail.com>

> What is elog? Standart convension is java:global.... is incorect.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4473374.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
What is elog? Standart convension is java:global.... is incorect.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4473374.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
you can do it between applications. to do so you need to use a lookup:

Context c = new InitialContext();
bean = c.lookup("the name in th elog");

don't use the EJBContainer in such a case

- Romain


2012/3/14 slawek <s....@gmail.com>

> I generated two wars, and it doesn't work.
>
> Best regards
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471882.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
I generated two wars, and it doesn't work. 

Best regards

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471882.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
put both jar in the same webapp and it should work, no?

- Romain


2012/3/14 slawek <s....@gmail.com>

> Thank you Romain for full example. It work! But in my case i have try to
> run
> two examples in two different projects. If ejb and ws are in this same
> project it works without any problem. But when i try to deploy ws as
> independent project and next deploy ws as other independent project on this
> same tomee it doesn't work. I can not call ejb from ws. I have this problem
> since yesterday.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471790.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Thank you Romain for full example. It work! But in my case i have try to run
two examples in two different projects. If ejb and ws are in this same
project it works without any problem. But when i try to deploy ws as
independent project and next deploy ws as other independent project on this
same tomee it doesn't work. I can not call ejb from ws. I have this problem
since yesterday.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471790.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
adding in src/main/java/... the bean:

@Stateless
public class RedBean {
    public String foo() {
        return "foo";
    }
}

and updating the webservice like it:

@Stateless
@WebService(
        portName = "CalculatorPort",
        serviceName = "CalculatorService",
        targetNamespace = "http://superbiz.org/wsdl",
        endpointInterface = "org.superbiz.calculator.ws.CalculatorWs")
public class Calculator implements CalculatorWs {
    @EJB
    private RedBean bean;

    public int sum(int add1, int add2) {
        return add1 + add2;
    }

    public int multiply(int mul1, int mul2) {
        return mul1 * mul2;
    }

    public String demo() {
        return bean.foo();
    }
}


and finally updating the test:

public class CalculatorTest {

    @BeforeClass
    public static void setUp() throws Exception {
        Properties properties = new Properties();
        properties.setProperty("openejb.embedded.remotable", "true");
        // properties.setProperty("httpejbd.print", "true");
        // properties.setProperty("httpejbd.indent.xml", "true");
        // properties.setProperty("logging.level.OpenEJB.server.http",
"FINE");
        EJBContainer.createEJBContainer(properties);
    }

    @Test
    public void test() throws Exception {
        Service calculatorService = Service.create(
                new URL("
http://127.0.0.1:4204/simple-webservice/Calculator?wsdl"),
                new QName("http://superbiz.org/wsdl", "CalculatorService"));

        assertNotNull(calculatorService);

        CalculatorWs calculator =
calculatorService.getPort(CalculatorWs.class);
        assertEquals(10, calculator.sum(4, 6));
        assertEquals(12, calculator.multiply(3, 4));

        assertEquals("foo", calculator.demo());
    }
}


works
- Romain


2012/3/14 slawek <s....@gmail.com>

> Simply incjection doesn't work too - while starting server there is error
> that class .......RedBean is not found. But i can invoke red bean using
> openejb jsp page.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471542.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
Simply incjection doesn't work too - while starting server there is error
that class .......RedBean is not found. But i can invoke red bean using
openejb jsp page.

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471542.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
did you try simply injecting your bean in the ws?

@EJB ReadBean bean;

- Romain


2012/3/14 slawek <s....@gmail.com>

> I will try to share example in the evening. But the are only two separated
> example projects from tomee examples plus above method, i use only oryginal
> codes. So, mayby i should set up only scope?
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471403.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
I will try to share example in the evening. But the are only two separated
example projects from tomee examples plus above method, i use only oryginal
codes. So, mayby i should set up only scope?

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471403.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
if you can share your sample (github/code google...) it can be useful.

- Romain


2012/3/14 slawek <s....@gmail.com>

> You have right, i'm not sure. How to set it up?
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471366.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>

Re: ejb from ws

Posted by slawek <s....@gmail.com>.
You have right, i'm not sure. How to set it up?

Best Regards
sw

--
View this message in context: http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4471366.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Re: ejb from ws

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi,

Are you sure of your openejb-core scope?

- Romain

Le 14 mars 2012 08:14, "slawek" <s....@gmail.com> a écrit :

> Hello,
> In my learing I try to connect to examples together. First I have build
> lookup-of-ejbs project and tested it - it works great. Next I prepered new
> example project simple-webservice - it works fine to. But in this project I
> added simpe method, where i call ejb:
> public String zwrocTekstZEjb()
>        {
>                String tekst="";
>                 try
>                 {
>                         Context context =
> EJBContainer.createEJBContainer().getContext();
>                         Friend friend = (Friend)
> context.lookup("java:global/lookup-of-ejbs/RedBean");
>                         tekst="My friend " + friend.sayHello();
>             }
>                 catch (Exception e)
>                 {
>                    throw new EJBException(e);
>             }
>                return tekst;
>        }
>
> Unfortunetly it doesn't work. When I call ws method zwrocTekstZEjb, I got
> error:
> The bean encountered a non-application exception; nested exception is:
>        javax.ejb.EJBException: javax.ejb.EJBException: Provider error. No
> provider
> definition found while invoking public abstract java.lang.String
> my_package.zwrocTekstZEjb() with params [].
>
> So I spend few hours and I haven't idea what is wrong.
>
> Best Regards
> sw
>
> --
> View this message in context:
> http://openejb.979440.n4.nabble.com/ejb-from-ws-tp4470387p4470387.html
> Sent from the OpenEJB User mailing list archive at Nabble.com.
>