Max public methods EJB can expose.

classic Classic list List threaded Threaded
8 messages Options
Reply | Threaded
Open this post in threaded view
|

Max public methods EJB can expose.

Vincenzo D'Aniello

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
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

Gurkan Erdogdu-5
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 <
[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

Vincenzo D'Aniello

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
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

jgallimore
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 <
[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

Vincenzo D'Aniello
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
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

jgallimore
Awesome, thank you!

On Thu, Jan 10, 2019 at 3:09 PM Vincenzo D'Aniello <
[hidden email]> 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
>
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

Vincenzo D'Aniello
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
Reply | Threaded
Open this post in threaded view
|

Re: Max public methods EJB can expose.

Vincenzo D'Aniello
Updates regarding this case? tnk!



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