[JBoss Remoting] - Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException
by Ron Sigal
Ron Sigal [https://community.jboss.org/people/ron_sigal] created the discussion
"Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException"
To view the discussion, visit: https://community.jboss.org/message/724808#724808
--------------------------------------------------------------
Hi Werner,
re: "Each call to this bean starts a new WorkerThread on the server with a new TCP/IP-Port."
The server has an upper limit on the number of worker threads that can be created, which can be modified by setting the parameter "maxPoolSize", so you might be on the right track. If a client connects to the server and (1) all existing worker threads are in use, and (2) the number of worker threads has reached the upper limit, the server will wait for a worker thread to be returned to the pool. But the stack trace in your first comment shows that the worker thread has alread been created, so that doesn't seem to fit your hypothesis.
re: "This will throw an InvocationTargetException and SocketTimeout Exception on the server, because he can not open his prefered port."
I'm not sure what you mean by "prefered port".
re: "Is there any possibility to set the range for workerthread-ports in a higher direction?"
No, the sockets used by the worker threads are created by ServerSocket.accept().
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/724808#724808]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[Beginner's Corner] - Looking for good Java source code examples of error handling and logging
by hocuspocus
hocuspocus [https://community.jboss.org/people/hocuspocus] created the discussion
"Looking for good Java source code examples of error handling and logging"
To view the discussion, visit: https://community.jboss.org/message/724555#724555
--------------------------------------------------------------
I'm trying to find some source code that illustrates proper Java coding techniques, particularly logging and error handling. A friend suggested I ask here as he thought your source code was particularly good and would give me excellent examples to imitate.
I know very little about JBoss and it is clearly a very complex project with many different components at many different levels of completion. I have no idea how uniform the quality of code is and as a relative novice in Java, I wouldn't necessarily recognize good professional-quality code myself. Therefore, I hope someone here can point me to a couple of projects within JBoss that are particularly well-written with regards to logging and error-handling. Also, if you can guide me on exactly how to find the source code for that project, I would greatly appreciate it.
With a bit of luck, I might even bet more actively involved in a project or two myself in the not too distant future once I'm satisfied that my coding is better. (Of course, I'll also need to have a little more spare time too!).
If you need any more information, please say so.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/724555#724555]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[jBPM] - Jbpm and openJPA
by malabalu
malabalu [https://community.jboss.org/people/malabalu] created the discussion
"Jbpm and openJPA"
To view the discussion, visit: https://community.jboss.org/message/724692#724692
--------------------------------------------------------------
We are trying to use openJPA fo rpersistence along with Spring . We ran into coupel of issues with SessionInfo, WorkItemInfo classes and a query in JBPorm.xml file.
We had to change the Id generation for the above 2 classes into Sequence as below
strategy = GenerationType.SEQUENCE, generator="sessionInfoIdSeq"...It was originally havifn AUTO but with geenrator as sessionInfoIdSeq...which prevented htese classes from enhanced.
Also once cross these problems, I ran into a query defined in JBPOrm.xml with ":" in it which is not suitable for JPA and also a field eventype reference which it complains that not found .So I had to include a orm.xml in my classpath and override the query as below.
<named-native-query name="ProcessInstancesWaitingForEvent" result-set-mapping="ProcessInstancesWaitingForEvent.mapping">
<query>
select distinct
p.InstanceId
from
ProcessInstanceInfo p
join
EventTypes e on p.InstanceId=e.InstanceId
</query>
</named-native-query>
Did anybody come across similar problems.Are my solutions right?
Also finally I am running into a problem if I include the plugin in my pom.xml to enhance, it complains as below
MetaDataFactory could not be configured (conf.newMetaDataFactoryInstance(
) returned null). This might mean that no configuration properties were found. E
nsure that you have a META-INF/persistence.xml file, that it is available in you
r classpath, or that the properties file you are using for configuration is avai
lable. If you are using Ant, please see the <properties> or <propertiesFile> att
ributes of the task's nested <config> element. This can also occur if your OpenJ
PA distribution jars are corrupt, or if your security policy is overly strict.
Any help will be appreciated.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/724692#724692]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months
[JBoss Remoting] - Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException
by Ron Sigal
Ron Sigal [https://community.jboss.org/people/ron_sigal] created the discussion
"Re: WorkerThread exception occured .... InvocationTargetException / SocketTimeoutException"
To view the discussion, visit: https://community.jboss.org/message/724201#724201
--------------------------------------------------------------
Hi Werner,
Well, I'm not sure what is going wrong, but I can describe the context.
When the client does an invocation and there is no existing pooled connection, a new socket is created, on both the client side and the server side. The client side creates an ObjectOutputStream and the server side creates a matching ObjectInputStream. When the ObjectOutputStream is created, some header bytes are written, and the ObjectInputStream's constructor tries to read them. For some reason, it is unable to read the header bytes, and eventually it times out.
So you should look for something in your system that is preventing those header bytes from getting to the server.
-Ron
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/724201#724201]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 3 months