You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Vincenzo D'Aniello <ic...@gmail.com> on 2019/01/10 13:25:47 UTC

Max public methods EJB can expose.

Hello everyone.
Time ago, I was preparing a remote interface (@Remote), and this interface
had to expose more than 5,000 public methods.

Practically though, when tomee was deploying the .war, it gave 'size limit
exceeded' error, making me understand that there is a maximum limit of
public methods under EJB, or at most the implementation of OpenEJB has this
limit.

In fact, by limiting the methods to 2500, the error no longer appeared.

My question is, where can I technically understand how many public methods I
can expose and if there is a way to extend this limit, thank you.



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Max public methods EJB can expose.

Posted by Vincenzo D'Aniello <ic...@gmail.com>.
Updates regarding this case? tnk!



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Max public methods EJB can expose.

Posted by Vincenzo D'Aniello <ic...@gmail.com>.
Finally I have completed the test on this issue (electronic invoicing in
Italy is taking us a long time).

However, it seems to be a JVM error, but let's say when openejb tries to
create the proxy for the remote interface.

Specifically, the error is:
sun.misc.ProxyGenerator.generateStaticInitializer
(ProxyGenerator.java:1261): IllegalArgumentException: code size limit
exceeded

This the git repo:
https://github.com/vidaniello/test-tomee-vidaniello

This is the test:
src / test / java / test / vidaniello / tomee / TestTomee.testServerStart
(). java



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Max public methods EJB can expose.

Posted by Jonathan Gallimore <jo...@gmail.com>.
Awesome, thank you!

On Thu, Jan 10, 2019 at 3:09 PM Vincenzo D'Aniello <
ict.management.trexon@gmail.com> wrote:

> Ok, as soon as I can, I prepare a test and the public on git, thanks for
> now
> ...
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>

Re: Max public methods EJB can expose.

Posted by Vincenzo D'Aniello <ic...@gmail.com>.
Ok, as soon as I can, I prepare a test and the public on git, thanks for now
...



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Max public methods EJB can expose.

Posted by Jonathan Gallimore <jo...@gmail.com>.
Off the top of my head, it sounds like a JVM thing as opposed to a TomEE /
OpenEJB thing, but I could well be wrong. That said, do you have an example
or the full error output so we can take a look?

Jon

On Thu, Jan 10, 2019 at 2:43 PM Vincenzo D'Aniello <
ict.management.trexon@gmail.com> wrote:

>
> The cause of 5000 methods concerns a component that calls methods from
> external library (.dll in windows, .so in linux, the library is
> multiplatform), so I do not unfortunately have the source code of this
> component, and so I needed to build a stateful EJB that externally recalled
> these methods.
>
> Fortunately I do not need all 5,000 methods, but I asked this question
> because I do not know if in the future I will have to add all the methods.
> thank you
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>

Re: Max public methods EJB can expose.

Posted by Vincenzo D'Aniello <ic...@gmail.com>.
The cause of 5000 methods concerns a component that calls methods from
external library (.dll in windows, .so in linux, the library is
multiplatform), so I do not unfortunately have the source code of this
component, and so I needed to build a stateful EJB that externally recalled
these methods.

Fortunately I do not need all 5,000 methods, but I asked this question
because I do not know if in the future I will have to add all the methods.
thank you



--
Sent from: http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html

Re: Max public methods EJB can expose.

Posted by Gurkan Erdogdu <cg...@gmail.com>.
Hi
I wonder why do you have 5000 public methods  in one class? Any specific
requirement?
Regards.
Gurkan

On Thu, Jan 10, 2019 at 4:25 PM Vincenzo D'Aniello <
ict.management.trexon@gmail.com> wrote:

>
> Hello everyone.
> Time ago, I was preparing a remote interface (@Remote), and this interface
> had to expose more than 5,000 public methods.
>
> Practically though, when tomee was deploying the .war, it gave 'size limit
> exceeded' error, making me understand that there is a maximum limit of
> public methods under EJB, or at most the implementation of OpenEJB has this
> limit.
>
> In fact, by limiting the methods to 2500, the error no longer appeared.
>
> My question is, where can I technically understand how many public methods
> I
> can expose and if there is a way to extend this limit, thank you.
>
>
>
> --
> Sent from:
> http://tomee-openejb.979440.n4.nabble.com/TomEE-Users-f979441.html
>