[Snowdrop] - Remote EJB call (JBoss AS7/EAP6 )
by dako ak
dako ak [https://community.jboss.org/people/dako_t] created the discussion
"Remote EJB call (JBoss AS7/EAP6 )"
To view the discussion, visit: https://community.jboss.org/message/825927#825927
--------------------------------------------------------------
Hi all,
I have deployed an EJB jar on JBoss AS 7/EAP6 and wants to call the EJB from my spring application.
I use the SimpleRemoteStatelessSessionProxyFactoryBean and it works for EJB's which are deployed an localhost.
Thats my sample config:
<bean id="converterConfigEJB" class="org.springframework.ejb.access.SimpleRemoteStatelessSessionProxyFactoryBean">
<property name="jndiTemplate" ref="remoteEjbJndiTemplate"/>
<property name="jndiName"
value="ejb:/Converter-EJBs/ConverterConfigService!de.mycompany.converter.ejb.interfaces.ConverterConfigServiceRemote" />
<property name="businessInterface" value="de.mycompany.converter.ejb.interfaces.ConverterConfigServiceRemote" />
</bean>
How can I configure that the remote EJB is deployed on a remote host?
I think with JNDI properties but if I look into the EJB client samples from Red Hat they are using a "jboss-ejb-client.properties" file with properties like this: "remote.connection.default.host".
I've tried to use this properties with a "org.springframework.jndi.JndiTemplate":
<bean id="remoteEjbJndiTemplate" class="org.springframework.jndi.JndiTemplate">
<property name="environment">
<props>
<prop key="remote.connectionprovider.create.options.org.xnio.Options.SSL_ENABLED">false</prop>
<prop key="remote.connection.default.host">localhost</prop>
<prop key="remote.connection.default.port">4447</prop>
<prop key="remote.connection.default.connect.options.org.xnio.Options.SASL_POLICY_NOANONYMOUS">default</prop>
</props>
</property>
</bean>
But it doesnt matter which values I set for host or port properties my example works. I think this jboss properties will be ignored. What are the correct properties for host and port?
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/825927#825927]
Start a new discussion in Snowdrop at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[Beginner's Corner] - Re: Jobss is shutting down
by N T
N T [https://community.jboss.org/people/jb_adm1n] created the discussion
"Re: Jobss is shutting down"
To view the discussion, visit: https://community.jboss.org/message/832933#832933
--------------------------------------------------------------
It doesn't help with -Xrs and it just crashes without giving any clue on what is causing the shutdown. We are using JBoss EAP 5.1 as standalone instance and when the client tries to access non existant resource (host), it's crashing with a UnknownHost exception which should not. Please find the log below and would greatly appreciate your help.
2013-08-15 14:41:23,484 INFO [STDOUT] (ajp-162.123.115.79-8009-4) Up front Reader is done
2013-08-15 14:41:23,499 INFO [STDOUT] (Thread-559) Reader [class com.divinvest.paris3.transactions.remittances.edits.readers.CaseLevelRemitFinancialActivityElectionReader] took 0.015 seconds.
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) Could not connect to server.
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) java.net.UnknownHostException: crdcasp3sbat
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:177)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.Socket.connect(Socket.java:529)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.Socket.connect(Socket.java:478)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.Socket.<init>(Socket.java:375)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.net.Socket.<init>(Socket.java:189)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.commons.net.DefaultSocketFactory.createSocket(DefaultSocketFactory.java:53)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.commons.net.SocketClient.connect(SocketClient.java:162)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.commons.net.SocketClient.connect(SocketClient.java:250)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.aegon.arch.util.FTPUtility.connect(FTPUtility.java:56)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.divinvest.paris3.uicontroller.eds.actions.LoadJobLayoutEDSAction.uploadFileForLoad(LoadJobLayoutEDSAction.java:1016)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.divinvest.paris3.uicontroller.eds.actions.LoadJobLayoutEDSAction.executeLogic(LoadJobLayoutEDSAction.java:125)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.divinvest.paris3.uicontroller.eds.actions.EDSBaseAction.execute(EDSBaseAction.java:177)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.divinvest.paris3.uicontroller.eds.actions.EDSBaseAction.perform(EDSBaseAction.java:351)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.struts.action.ActionServlet.processActionPerform(ActionServlet.java:1787)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1586)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at com.divinvest.paris3.uicontroller.eds.EdsUIC.service(EdsUIC.java:75)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:235)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:183)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:95)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.process(SecurityContextEstablishmentValve.java:126)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:70)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:330)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.coyote.ajp.AjpAprProcessor.process(AjpAprProcessor.java:419)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.coyote.ajp.AjpAprProtocol$AjpConnectionHandler.process(AjpAprProtocol.java:402)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:2036)
2013-08-15 14:41:25,092 ERROR [STDERR] (ajp-162.123.115.79-8009-1) at java.lang.Thread.run(Thread.java:662)
2013-08-15 14:41:25,092 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (JBoss Shutdown Hook) Runtime shutdown hook called, forceHalt: true
2013-08-15 14:41:25,092 INFO [org.apache.coyote.http11.Http11AprProtocol] (JBoss Shutdown Hook) Pausing Coyote HTTP/1.1 on http-162.123.115.79-8080
2013-08-15 14:41:25,108 INFO [org.apache.coyote.http11.Http11AprProtocol] (JBoss Shutdown Hook) Stopping Coyote HTTP/1.1 on http-162.123.115.79-8080
2013-08-15 14:41:26,154 INFO [org.apache.coyote.ajp.AjpAprProtocol] (JBoss Shutdown Hook) Pausing Coyote AJP/1.3 on ajp-162.123.115.79-8009
2013-08-15 14:41:26,154 INFO [org.apache.coyote.ajp.AjpAprProtocol] (JBoss Shutdown Hook) Stopping Coyote AJP/1.3 on ajp-162.123.115.79-8009
2013-08-15 14:41:26,201 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/parisIII
2013-08-15 14:41:26,248 INFO [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/parisIII]] (JBoss Shutdown Hook) action: Finalizing this controller servlet
2013-08-15 14:41:26,342 INFO [org.jboss.proxy.ejb.ProxyFactory] (JBoss Shutdown Hook) Unbind EJB Home 'ReportBO' from jndi 'ReportBO'
2013-08-15 14:41:26,357 INFO [org.jboss.ejb.EjbModule] (JBoss Shutdown Hook) Undeployed ReportBO
................
......................
2013-08-15 14:41:28,778 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/invoker
2013-08-15 14:41:28,778 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/jbossws
2013-08-15 14:41:28,778 INFO [org.jboss.web.tomcat.service.deployers.TomcatDeployment] (JBoss Shutdown Hook) undeploy, ctxPath=/web-console
2013-08-15 14:41:28,794 INFO [org.apache.catalina.core.StandardService] (JBoss Shutdown Hook) Stopping service jboss.web
2013-08-15 14:41:28,810 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (JBoss Shutdown Hook) Stopping transaction recovery manager
2013-08-15 14:41:28,810 INFO [com.arjuna.ats.jbossatx.jta.TransactionManagerService] (JBoss Shutdown Hook) Destroying TransactionManagerService
2013-08-15 14:41:29,606 INFO [org.jboss.mail.MailService] (JBoss Shutdown Hook) Mail service 'java:/Mail' removed from JNDI
2013-08-15 14:41:34,947 INFO [org.jboss.bootstrap.microcontainer.ServerImpl] (JBoss Shutdown Hook) Shutdown complete
I searched on the forums but no useful clue found. It is a very common issue it seems as many people reported but seems like a better documentation would greatly help people. Let me know if any other info needed.
Thanks in advance.
Regards,
TN
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832933#832933]
Start a new discussion in Beginner's Corner at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[Performance Tuning] - jboss 5.1.0: performance drops after one hour and strange GC behaviour
by Matt Darwin
Matt Darwin [https://community.jboss.org/people/mattdarwin] created the discussion
"jboss 5.1.0: performance drops after one hour and strange GC behaviour"
To view the discussion, visit: https://community.jboss.org/message/832880#832880
--------------------------------------------------------------
We upgraded our software from jboss 4.0.5GA to 5.1.0GA and noticed that after one hour or so (or 90 minutes in some cases) performance drops dramatically.
At the same moment, the garbage collector logs show minor garbage collection times jumping from 0.01s to ~1.5s, with the amount of the heap being cleared each time reducing from ~400MB before to ~300MB after. (see GC viewer graph 1)
https://community.jboss.org/servlet/JiveServlet/showImage/2-832880-21301/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-832880-21...
We think these are both symptoms of the the same underlying root cause.
jvm settings are:
-server -Xms2048m -Xmx2048m -XX:NewSize=384m -XX:MaxNewSize=384m -XX:SurvivorRatio=4 -XX:MinHeapFreeRatio=11 -XX:PermSize=80m -verbose:gc -XX:+PrintGCDateStamps -XX:+PrintGCDetails -XX:+DisableExplicitGC -Djava.awt.headless=TRUE -DUseSunHttpHandler=TRUE -Dsun.net.client.defaultConnectTimeout=25000 -Dsun.net.client.defaultReadTimeout=50000 -Dfile.encoding=UTF-8 -Dvzzv.log.dir=${ercorebatch.log.dir} -Xloggc:${ercorebatch.log.dir}/gc.log -Duser.language=it -Duser.region=IT -Duser.country=IT -DVFjavaWL=er.core.it
The production environment is T5220 or T2000 hardware, with 32 bit SPARC, running a Solaris 10 virtual machine. jboss 5.0.1.GA, java 1.6.0_17
We set up a test environment consisting of 2 identical boxes, running the same software but one using jboss 4.0.5GA and one using jboss 5.0.1.GA. They are VMWare VMs running on a HP ProLiant DL560 Gen8 with 4 x 2.2GHz Intel Xeon CPU E5-4620 and 64GB RAM. Guest VMs are 4 vCPU, 4096MB RAM, CentOS 6.4.
We found that we could easily reproduce the problem in our environment. The box which was running on 4.0.5 ran fine, but on jboss 5.0.1GA we saw the same strange GC behaviour. Performance can't easily be tested in our environment since we don't have the same amount of load as production.
We don't think it's a memory leak, since after each major GC, the used heap size returns to the same size:
https://community.jboss.org/servlet/JiveServlet/showImage/2-832880-21302/... https://community.jboss.org/servlet/JiveServlet/downloadImage/2-832880-21...
Analysing heap dumps taken pre- and post-apocalypse, we discovered the number of the following objects was different:
org.jboss.virtual.plugins.context.file.FileSystemContext
during the first hour, there are about 8 of them, and after the apocalypse hits, we see between 100 and 800.
Other than that, the heap dumps look quite similar, and the top objects are either java or jboss objects (ie no application classes)
Setting -Djboss.vfs.forceVfsJar=true on our test environment fixed the problem (ie the strange GC behaviour disappeared) but when applied in production, both the strange GC pattern and the performance problem remained - although the GC times didn't increase so much (to 0.3 seconds rather than 1.5 seconds).
In our test environment, we then deployed the same software in jboss 5.1.0 and found the same behaviour as with 5.0.1.
So the conclusions at this point are that there is something happening in jboss 5.x around the 60 / 90 minute mark which has an impact on both garbage collection and performance.
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832880#832880]
Start a new discussion in Performance Tuning at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[jBPM] - where to set "update" in databaseschema
by Thomas Colditz
Thomas Colditz [https://community.jboss.org/people/fellowtom] created the discussion
"where to set "update" in databaseschema"
To view the discussion, visit: https://community.jboss.org/message/832618#832618
--------------------------------------------------------------
Hi Community,
I simply want to setup jBPM with embedded H2 database. It works, that it isn't an inmem db. But everytime the engine is startet again, all content of db is overwritten.
I think the problem is an "create"-statement somewhere, where an "update" should be inserted. But I just dont know where...
Here's sample code:
public static void main(String[] args) {
try {
RuntimeManager manager = getRuntimeManager("processDefinition/simpleTestProcess.bpmn");
RuntimeEngine runtime = manager.getRuntimeEngine(EmptyContext.get());
KieSession ksession = runtime.getKieSession();
ksession.startProcess("serviceTestProcess");
} catch (Throwable t) {
t.printStackTrace();
}
}
private static RuntimeManager getRuntimeManager(String process) {
JBPMHelper.startH2Server();
Properties properties = new Properties();
PoolingDataSource pds = new PoolingDataSource();
pds.setUniqueName(properties.getProperty("persistence.datasource.name", "jdbc/jbpm-ds"));
pds.setClassName("bitronix.tm.resource.jdbc.lrc.LrcXADataSource");
pds.setMaxPoolSize(5);
pds.setAllowLocalTransactions(true);
pds.getDriverProperties().put("user", properties.getProperty("persistence.datasource.user", "sa"));
pds.getDriverProperties().put("password", properties.getProperty("persistence.datasource.password", "sa"));
pds.getDriverProperties().put("url", properties.getProperty("persistence.datasource.url", "jdbc:h2:~/JBPM/process_jbpm;MVCC=TRUE"));
pds.getDriverProperties().put("driverClassName", properties.getProperty("persistence.datasource.driverClassName", "org.h2.Driver"));
pds.init();
RuntimeEnvironment environment = RuntimeEnvironmentBuilder.getDefault()
.addAsset(ResourceFactory.newClassPathResource(process), ResourceType.BPMN2)
.get();
return RuntimeManagerFactory.Factory.get().newSingletonRuntimeManager(environment);
}
Please let me know, where/how to fix the problem.
With kind regards,
Tom
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832618#832618]
Start a new discussion in jBPM at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months
[JBoss Remoting] - Error connecting to jmx for server JBoss 7.1 Runtime Server
by Pavel Garanin
Pavel Garanin [https://community.jboss.org/people/loki6999] created the discussion
"Error connecting to jmx for server JBoss 7.1 Runtime Server"
To view the discussion, visit: https://community.jboss.org/message/832867#832867
--------------------------------------------------------------
HI all, i hav problam with conn to jmx from eclips. Jboss server is started but uf open log list i see next
Error connecting to jmx for server JBoss 7.1 Runtime Server
if open to mor information will be se next cod Error
org.jboss.tools.jmx.core.JMXException: Unable to reach JBoss instance. Please ensure your server is up and exposes its management ports via the -Djboss.bind.address.management=yourwebsite.com system property
at org.jboss.ide.eclipse.as.jmx.integration.JBoss71ServerConnection.createConnection(JBoss71ServerConnection.java:87)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:143)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:127)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.run(JBossServerConnection.java:116)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection.connectToStartedServer(JBossServerConnection.java:233)
at org.jboss.ide.eclipse.as.jmx.integration.JBossServerConnection$1.run(JBossServerConnection.java:225)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: java.lang.RuntimeException: Operation failed with status WAITING
at org.jboss.remoting3.jmx.RemotingConnector.connect(RemotingConnector.java:155)
at javax.management.remote.JMXConnectorFactory.connect(Unknown Source)
at org.jboss.ide.eclipse.as.jmx.integration.JBoss71ServerConnection.createConnection(JBoss71ServerConnection.java:71)
... 6 more
Wat i mast do ?
P.S. Sorri for my English
--------------------------------------------------------------
Reply to this message by going to Community
[https://community.jboss.org/message/832867#832867]
Start a new discussion in JBoss Remoting at Community
[https://community.jboss.org/choose-container!input.jspa?contentType=1&con...]
12 years, 8 months