TomEE 7.0.3. : Requests are rejected

2018-05-22 Thread jolinnen
Hello,
since this year we use an uptime monitor for our webservice. From time to
time this monitor reports that our service is unavailable for just a short
time.
I see in our logfiles (and even in catalina.out), that the service is still
online at this time, but it seems that some requests are rejected.

In  localhost_access_log I found entries like this:

194.187.221.160 - - [22/May/2018:14:31:51 +0200] "GET /OurService/version
HTTP/1.1" 200 47
194.187.221.160 - - [22/May/2018:14:35:28 +0200] "GET /OurService/version
HTTP/1.1" 200 47
194.187.221.160 - - [22/May/2018:14:37:02 +0200] "GET /OurService/version
HTTP/1.1" 200 47
*194.187.221.160 - - [22/May/2018:14:40:36 +0200] "GET /OurService/version
HTTP/1.1" 500 73*
194.187.221.160 - - [22/May/2018:14:40:36 +0200] "GET /OurService/version
HTTP/1.1" 200 47
194.187.221.160 - - [22/May/2018:14:42:26 +0200] "GET /OurService/version
HTTP/1.1" 200 47

and in catalina.out I can see an entry for the requests with HTTP status
200, but not for the 500 status. So my guess is that the uptime monitor
complains about this.

We are using default parameters in server.xml.

Have someone an idea what's happened? Should we increase maxThreads or what
ever?  Is there a possibility for getting more information about the reason
for the rejects?

Many thanks in advance

Cheers

Jörg



 



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


Re: Using @EJB from an EAR app inside a webservice in a different WAR

2016-05-12 Thread jolinnen
Hello again,

no, contrary:  the EJB is in an EAR (deployed in apps)  while the
restservice is in the WAR (deployed in webapps).
My version: Apache Tomcat (TomEE)/7.0.68 (1.7.4) (not very old).

I will make some further testing, for me it seems that components in apps
and webapps cannot see each other.

Thank you.
jolinnen



--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Using-EJB-from-an-EAR-app-inside-a-webservice-in-a-different-WAR-tp4678407p4678418.html
Sent from the TomEE Users mailing list archive at Nabble.com.


Re: Using @EJB from an EAR app inside a webservice in a different WAR

2016-05-12 Thread jolinnen
Hi,
thanks for your quick reply.
Okay, I change to

@Stateless
@Startup
@LocalBean
@Remote(WMAuthEJB.class)
public class WMAuthEJBImpl
   implements WMAuthEJB
{
}

and

// @Stateless
// @Singleton
@Path("/")
public class WMAuthService
{
/*
@EJB
private WMAuthEJBwmauth;
*/
@Inject
private WMAuthEJBImplwmauth;

and the error has changed:

SEVERE: error invoking
org.apache.tomee.webservices.TomeeJaxRsService@23d29c10
java.lang.NoClassDefFoundError: LWMAuthEJBImpl;
at java.lang.Class.getDeclaredFields0(Native Method)
at java.lang.Class.privateGetDeclaredFields(Class.java:2317)
at java.lang.Class.getDeclaredFields(Class.java:1762)
at
org.apache.openejb.server.cxf.rs.Contexts.findContextFields(Contexts.java:53)
at
org.apache.openejb.server.cxf.rs.CdiResourceProvider.findContexts(CdiResourceProvider.java:131)
at
org.apache.openejb.server.cxf.rs.CdiResourceProvider.(CdiResourceProvider.java:103)
at
org.apache.openejb.server.cxf.rs.OpenEJBPerRequestPojoResourceProvider.(OpenEJBPerRequestPojoResourceProvider.java:28)
at
org.apache.openejb.server.cxf.rs.CxfRsHttpListener.deployApplication(CxfRsHttpListener.java:522)
at
org.apache.openejb.server.rest.RESTService.deployApplication(RESTService.java:464)
at
org.apache.openejb.server.rest.RESTService.afterApplicationCreated(RESTService.java:275)
at
org.apache.tomee.webservices.TomeeJaxRsService.afterApplicationCreated(TomeeJaxRsService.java:53)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

CDI complains. Maybe the EAR in apps have a different JNDI context than the
WAR in webapps? is it possible to browse the context?

Thanks again.

Cheers

jolinnen




--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Using-EJB-from-an-EAR-app-inside-a-webservice-in-a-different-WAR-tp4678407p4678409.html
Sent from the TomEE Users mailing list archive at Nabble.com.


Using @EJB from an EAR app inside a webservice in a different WAR

2016-05-12 Thread jolinnen
Hello,
I face a problem for which i cannot find a solution although I did a lot of
reading, coding and testing.
My situation:

I've have an EAR with an EJB like this:

@Stateless
@Startup
@Local(WMAuthEJB.class)
@Remote(WMAuthEJB.class)
public class WMAuthEJBImpl
   implements WMAuthEJB
{
}

I deploy the EAR in the app-directory and on the log of TomEE I find this
(amongst others):

INFO:
Jndi(name=global/authservices_ear-1.0/authservices_ejb-1.0/WMAuthEJBImpl!wm.administration.ejb.WMAuthEJB)
--> Ejb(deployment-id=WMAuthEJBImpl)

and I can use it in a remote client. So that's fine.

But now I must use this EJB  inside a rest webservice, I tried this (amongst
others)

// @Stateless
// @Singleton
@Path("/")
public class WMAuthService
{
@EJB
private WMAuthEJBwmauth;
}

After deploying the myservice.war in webapps the TomEE log say

INFO: Skipping deployment of Class class myservice due to a
NoClassDefFoundError: LWMAuthEJB;

To tell the truth I have no idea what to do or what to read next. Sorry for
that but I had a simolar situation on JBoss with a solution of an xml config
file (jboss-deployme-structure.xml).

Does someone has an advice for me?

Many Thanks

jolinnen







--
View this message in context: 
http://tomee-openejb.979440.n4.nabble.com/Using-EJB-from-an-EAR-app-inside-a-webservice-in-a-different-WAR-tp4678407.html
Sent from the TomEE Users mailing list archive at Nabble.com.