we're using wildfly 8.2 in cluster mode , with ha profil, so as to benefit from failover fonctionnality.
But seems that things don't work properly since we enable </distributable> in our web.xml, because session attributes disapear from user's session abnormally.
Here is our cache configuration in domain.xml:
<cache-container name="web" default-cache="dist" module="org.wildfly.clustering.web.infinispan">
<transport lock-timeout="60000"/>
<local-cache name="passivation" batching="true">
<file-store passivation="true" purge="false"/>
</local-cache>
<distributed-cache name="dist" batching="true" mode="ASYNC" owners="2" l1-lifespan="0">
<locking isolation="READ_COMMITTED" striping="false" acquire-timeout="30000" concurrency-level="20000"/>
<transaction locking="OPTIMISTIC"/>
<file-store/>
</distributed-cache>
</cache-container>
Is someone facing the same problem?
is this problem caused by session passivation ?
Related
Im trying to create data source for neo4j in websphere application server but its failing to connect. Any pointers on this would be helpful.
JDBC Driver Created with the following parameters:
Name : neo4j Driver
Class path : path of the neo4j jdbc jar/neo4j-jdbc-driver-3.3.1.jar
Implementation class name : org.neo4j.jdbc.Driver
Data source created with the following :
jndi Name: jdbc/neo4j
Custom Properties:
auth : container
type: javax.sql.DataSource
username: neo4j
password: password
url:jdbc:neo4j:bolt://localhost:port
removeAbandonedOnBorrow : true
closeMethod : close
The properties are added based on the pointers provided in https://github.com/neo4j-contrib/neo4j-jdbc
Here is the error from logs:
java.lang.Exception: DSRA8101E: DataSource class cannot be used as
one-phase: ClassCastException: org.neo4j.jdbc.bolt.BoltDriver
incompatible with javax.sql.ConnectionPoolDataSource [5/27/19
13:12:41:533 UTC] 00000111 SystemErr R at
com.ibm.ws.rsadapter.AdapterUtil.createDataStoreAdapterException(AdapterUtil.java:441)
[5/27/19 13:12:41:533 UTC] 00000111 SystemErr R at
com.ibm.ws.rsadapter.DSConfigHelper.getPooledConnection(DSConfigHelper.java:1340)
According to its documentation Neo4j is NOT a compliant JDBC driver.
We cover these aspects of the JDBC-APIs, everything that’s not
explicitely mentioned should be assumed to be not implemented
It also doesn't implement required javax.sql.DataSoruce interface, so it cannot be configured in the server. You will need to handle it in the application code.
To clarify for others who may find this post in the future - whether or not it is possible to directly configure to java.sql.Driver depends on whether WebSphere Application Server traditional vs Liberty is being used.
A more indirect approach is possible in WebSphere Application Server traditional, which involves mocking up a ConnectionPoolDataSource class around the driver. It is discussed under a related stack overflow post.
With Liberty 18.0.0.3 and above, it is possible to directly configure a dataSource specifying only the URL, with examples given under this knowledge center document.
Here is an example dataSource configuration in Liberty,
<featureManager>
<feature>jdbc-4.2</feature>
<feature>jndi-1.0</feature>
... other features
</featureManager>
<dataSource jndiName="jdbc/neo4j" containerAuthDataRef="neo4jAuth">
<jdbcDriver libraryRef="neo4j"/>
<properties URL="jdbc:neo4j:bolt://localhost:7687"/>
</dataSource>
<authData id="neo4jAuth" user="neo4j" password="password"/>
<library>
<file name="C:/drivers/neo4j/neo4j-jdbc-driver-3.3.1.jar"/>
</library>
I am trying to do load test for zuul version 1.1.2.
However I am keep getting following issue after few a minute for running load test.
Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: book could not acquire a semaphore for execution and no fallback available.
at com.netflix.hystrix.AbstractCommand$21.call(AbstractCommand.java:783) ~[hystrix-core-1.5.3.jar:1.5.3]
My question is how can I increase maxSemaphores via confiugration.
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds= 20000000
zuul.hystrix.command.default.execution.isolation.strategy= SEMAPHORE
zuul.hystrix.command.default.execution.isolation.semaphore.maxConcurrentRequests= 10
zuul.hystrix.command.default.fallback.isolation.semaphore.maxConcurrentRequests= 10
zuul.semaphore.maxSemaphores=3000
zuul.eureka.book.semaphore.maxSemaphore=30000
I have tried search many option on Intenet but one of those works for me
Please advise
it turns out I am using old version. For later version we could set semaphores at Zuul level. below is an example to set the maxSemaphores 3000 as default for routing to every proxied service
zuul.semaphore.maxSemaphores=3000
The actual property is max-semaphores (this would be with yaml config):
zuul:
semaphore:
#com.netflix.hystrix.exception.HystrixRuntimeException: "microservice" could not acquire a semaphore for execution and no fallback available.
max-semaphores: 2000
I'm using equinox weaving to do aspect across bundles in Virgo tomcat, I followed the weaving sample. It worked fine in eclipse target platform. But when I deployed into virgo, it didn't work.
I modified config.ini like below
……
osgi.framework.extensions=org.eclipse.equinox.weaving.hook_1.0.200.I20130319-1000
osgi.bundles=org.eclipse.equinox.weaving.aspectj#2\:start,org.aspectj.weaver#2\:start,org.aspectj.runtime#2\:start
aj.weaving.verbose=true
org.aspectj.weaver.showWeaveInfo=true
org.aspectj.osgi.verbose=true
……
No exception occrred when starting Virgo, and bundles' state were correct
id State Bundle
0 ACTIVE org.eclipse.osgi_3.8.1.v20120830-144521
Fragments=1, 34
1 RESOLVED org.eclipse.equinox.weaving.hook_1.0.200.I20130319-1000
Master=0
2 ACTIVE org.eclipse.equinox.weaving.aspectj_1.0.300.I20130319-1000
3 ACTIVE org.aspectj.weaver_1.7.3.20130613144500-a
4 ACTIVE org.aspectj.runtime_1.7.3.20130613144500-a
I found some difference in consoles. When starting in eclipse target platform, next tow statements displayed in consoles
[org.eclipse.equinox.weaving.hook] info adding AspectJ hooks ...
[org.eclipse.equinox.weaving.aspectj] info Starting AspectJ weaving service ...
But when starting in Virgo, just the second one displayed. I considered maybe the hook didn't start correctly, but i'm not sure. Anyone can help me?
Here's some considerations when installing onto IIS-6:
Needs to register ASP.NET 4 (likely using aspnet_regiis.exe)
Needs to allow for both ASP.NET v2 and v4
Needs to register aspnet_isapi.dll with support for wildcard mapping
And here's what I have so far:
<iis:WebDirProperties Id='WebDirProperties' Script='yes' Read='yes
Execute='no' WindowsAuthentication='yes' AnonymousAccess='no'
AuthenticationProviders='NTLM,Negotiate' />
<!-- SO has some good posts on selecting the website from a dropdown -->
<iis:WebSite Id='SelectedWebSite' Directory='WWWROOT' SiteId='[WEBSITE_ID]' Description='[WEBSITE_DESCRIPTION]'>
<iis:WebAddress Id='AllUnassigned' Port='80' IP='*'/>
</iis:WebSite>
<Component Id="ProjWebApp" Guid="{B4BE9223-7109-4943-AE4E-8F72FA350D02}"
Win64="$(var.IsWin64)" NeverOverwrite="yes" Transitive="yes">
<CreateFolder/>
<iis:WebAppPool Id="ProjAppPool" Name="[APPPOOLNAME]" Identity="networkService"
ManagedRuntimeVersion="v4.0" ManagedPipelineMode="integrated" />
<iis:WebVirtualDir Id="ProjVDir" DirProperties="WebDirProperties"
Alias="[WEBAPPNAME]" Directory="WEBFILESDIR" WebSite="SelectedWebSite">
<iis:WebApplication Id="ProjApp" Name="[WEBAPPNAME]" WebAppPool="ProjAppPool">
<iis:WebApplicationExtension
CheckPath="no"
Script="yes"
Executable="[ASPNETISAPIDLL]"
Verbs="GET,HEAD,POST"
/>
</iis:WebApplication>
</iis:WebVirtualDir>
</Component>
<!-- other apps may start using it once installed so it must be permanent -->
<Component Id="EnableASPNet4Extension" Permanent="yes" Guid="{C8CDAB96-5DDC-4B4C-AD7E-CD09B59F7813}">
<iis:WebServiceExtension Id="ASPNet4Extension" Group="ASP.NET v4.0.30319"
Allow="yes" File="[ASPNETISAPIDLL]" Description="ASP.NET v4.0.30319"
UIDeletable="no"
/>
</Component>
And I have a custom action to register ASP.NET with IIS:
<?if $(var.Platform) = x64 ?>
<CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd"
Property="AspNetRegIIS_InstallNet40Cmd"
Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR64]aspnet_regiis.exe" -ir"/>
<?else?>
<CustomAction Id="SetProperty_AspNetRegIIS_InstallNet40Cmd"
Property="AspNetRegIIS_InstallNet40Cmd"
Value=""[NETFRAMEWORK40FULLINSTALLROOTDIR]aspnet_regiis.exe" -ir"/>
<?endif?>
The Problem
This almost works. There are two problems at this point:
The IIS extension doesn't respect the managed runtime version on IIS-6, so the application doesn't have an ASP.NET version set.
If I use aspnet_regiis.exe -s APP_PATH to register it once it's created, it overwrites the wildcard mapping (and I don't know a commandline that I can run to restore it).
Given the above shortcomings, how can I use WIX to install an ASP.NET MVC 3 application onto IIS-6 with a proper wildcard mapping when it already has ASP.NET 2 installed?
It turns out this was a dumb error on my part. The above is sufficient to make ASP.NET v4 applications work when the pieces that I didn't include (custom actions and property definitions) are correct.
In my case, I had accidentally quoted the path to the aspnet_isapi.dll, so it wasn't actually being picked up correctly.
The IIS extension doesn't respect the managed runtime version on IIS-6, so the application doesn't have an ASP.NET version set.
That's partially true. Although it doesn't use the managed runtime version when setting the App Pool, IIS actually picks up the ASP.NET version as soon as something is correctly mapped to the aspnet_isapi.dll. As soon as I fixed the path, everything worked correctly.
If I use aspnet_regiis.exe -s APP_PATH to register it once it's created, it overwrites the wildcard mapping (and I don't know a commandline that I can run to restore it).
You can use adsutil.vbs in order to manage this if need be:
C:\Inetpub\AdminScripts>adsutil.vbs enum w3svc/998577302/root/AppName
KeyType : (STRING) "IIsWebVirtualDir"
...
ScriptMaps : (LIST) (1 Items)
"*,C:\WINDOWS\Microsoft.NET\Framework64\v4.0.30319\aspnet_isapi.dll,1,GET,HEAD
,POST"
By using the set command in adsutil.vbs you can set the ScriptMaps property as needed.
What do I need to do to make CDI work on my wicket quickstart project? When I try to launch the Jetty server, I get an exception:
org.jboss.seam.solder.beanManager.BeanManagerUnavailableException: Failed to locate BeanManager using any of these providers: org.jboss.seam.solder.beanManager.DefaultJndiBeanManagerProvider(11), org.jboss.seam.solder.beanManager.ServletContainerJndiBeanManagerProvider(10)
at org.jboss.seam.solder.beanManager.BeanManagerLocator.getBeanManager(BeanManagerLocator.java:91)
at org.jboss.seam.wicket.SeamApplication.internalInit(SeamApplication.java:54)
at org.apache.wicket.protocol.http.WicketFilter.init(WicketFilter.java:723)
...
I am authoring a wicket project. I don't know the first thing about Seam, Weld, or CDI; I want to learn it by incorporating it into a small project. I am following this reference documentation:
http://docs.jboss.org/seam/3/wicket/latest/reference/en-US/html_single/
Right now, I am swimming in a sea of alien documentation trying to find the answer. Help!
Edit:
The Jetty server in the wicket quickstart is created programmatically. Based on the documentation given below, I created:
webapp/WEB-INF/jetty-env.xml:
<!DOCTYPE Configure PUBLIC "-//Mort Bay Consulting//DTD Configure//EN"
"http://jetty.mortbay.org/configure.dtd">
<Configure id="webAppCtx" class="org.mortbay.jetty.webapp.WebAppContext">
<New id="BeanManager" class="org.mortbay.jetty.plus.naming.Resource">
<Arg><Ref id="webAppCtx"/></Arg>
<Arg>BeanManager</Arg>
<Arg>
<New class="javax.naming.Reference">
<Arg>javax.enterprise.inject.spi.BeanManager</Arg>
<Arg>org.jboss.weld.resources.ManagerObjectFactory</Arg>
<Arg/>
</New>
</Arg>
</New>
</Configure>
In web.xml, I have added the following snippet:
<resource-env-ref>
<resource-env-ref-name>BeanManager</resource-env-ref-name>
<resource-env-ref-type>
javax.enterprise.inject.spi.BeanManager
</resource-env-ref-type>
</resource-env-ref>
<listener>
<listener-class>org.jboss.seam.solder.resourceLoader.servlet.ResourceListener</listener-class>
</listener>
The following Java code is responsible for setting up the Jetty server in the quickstart environment, when Start is run:
Server server = new Server();
SocketConnector connector = new SocketConnector();
// Set some timeout options to make debugging easier.
connector.setMaxIdleTime(1000 * 60 * 60);
connector.setSoLingerTime(-1);
connector.setPort(8080);
server.setConnectors(new Connector[] { connector });
WebAppContext bb = new WebAppContext();
bb.setServer(server);
bb.setContextPath("/");
bb.setWar("src/main/webapp");
// FIXME: This doesn't seem to do anything? bb.addEventListener(new ResourceListener());
server.addHandler(bb);
/* I don't know what this commented code does, but it doesn't fix the problem when uncommented. */
// START JMX SERVER
// MBeanServer mBeanServer = ManagementFactory.getPlatformMBeanServer();
// MBeanContainer mBeanContainer = new MBeanContainer(mBeanServer);
// server.getContainer().addEventListener(mBeanContainer);
// mBeanContainer.start();
I am using jetty version 6.1.25, according to my Maven Dependencies.
The 42Lines folks have published a Wicket-CDI integration library that includes a working example project.
Several of these guys are actually Wicket committers; they write good code, and they know what they're doing.
In a servlet container you need to bootstrap Weld CDI yourself to make it available to Seam. The documentation states this under installation:
http://docs.jboss.org/seam/3/wicket/latest/reference/en-US/html_single/#wicket.installation
With a link to the relative Weld bootstrapping documentation for either Jetty 6 or 7:
http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#d0e5286
It should work fine after configuring Jetty to bootstrap Weld. However please take not of the limitations of using Weld within a servlet container:
http://docs.jboss.org/weld/reference/latest/en-US/html/environments.html#d0e5221
Also ensure that you have an empty (or configured) beans.xml in your WEB-INF/ directory.