Skip to content

Instantly share code, notes, and snippets.

Lin Gao gaol

Block or report user

Report or block gaol

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@gaol
gaol / gist:957a50e9c28b23a80d983a944a318e30
Created Jun 15, 2017
Example for query by nested resources
View gist:957a50e9c28b23a80d983a944a318e30
JBoss Mojo page: https://developer.jboss.org/wiki/ProposedRequirementsForImprovingQueryOperationForNestedChildResourcesAndComplexAttributes
Steps to create data source valid checker:
===
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-class-name,value=org.jboss.jca.adapters.jdbc.extensions.novendor.SQLExceptionValidConnectionChecker)
> :reload
> /subsystem=datasources/data-source=ExampleDS:write-attribute(name=valid-connection-checker-properties, value={reason=>NoReason})
> :reload
@gaol
gaol / gist:b38189b8493df5b5c6b779c510ba64f7
Created Mar 9, 2017
long-running-servlet-without-shutdownNow
View gist:b38189b8493df5b5c6b779c510ba64f7
11:06:22,998 DEBUG [io.undertow.request] (default I/O-3) Matched prefix path /long-running-servlet for path /long-running-servlet/HeavyProcessing
11:06:23,007 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}, authentication required: false
11:06:23,008 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@3e39fda2 for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}
11:06:23,008 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing re
@gaol
gaol / gist:feebbd48d37f347060c32a31c4523519
Created Mar 8, 2017
shutdown by interrupt long running servlet
View gist:feebbd48d37f347060c32a31c4523519
18:30:25,628 DEBUG [io.undertow.request] (default I/O-1) Matched prefix path /long-running-servlet for path /long-running-servlet/HeavyProcessing
18:30:25,651 DEBUG [io.undertow.request.security] (default task-1) Attempting to authenticate HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}, authentication required: false
18:30:25,653 DEBUG [io.undertow.request.security] (default task-1) Authentication outcome was NOT_ATTEMPTED with method io.undertow.security.impl.CachedAuthenticatedSessionMechanism@76806308 for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing request {Accept=[*/*], User-Agent=[curl/7.51.0], Host=[127.0.0.1:8080]} response {X-Powered-By=[Undertow/1], Server=[WildFly/10]}}
18:30:25,653 DEBUG [io.undertow.request.security] (default task-1) Authentication result was ATTEMPTED for HttpServerExchange{ GET /long-running-servlet/HeavyProcessing re
@gaol
gaol / Message is stored to page only
Created May 4, 2016
Message is stored to page only
View Message is stored to page only
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building ActiveMQ Artemis Integration Tests 1.3.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ integration-tests ---
[INFO] Deleting /sources/activemq-artemis/tests/integration-tests/target
[INFO]
[INFO] --- maven-enforcer-plugin:1.4:enforce (enforce-maven) @ integration-tests ---
@gaol
gaol / wildfly-core-duplicate-description-items
Last active Dec 1, 2015
Duplicate values in LocalDescriptions.properties files of wildfly and wildfly-core code bases
View wildfly-core-duplicate-description-items
Duplicated items in File: ./controller/src/main/resources/org/jboss/as/controller/descriptions/common/LocalDescriptions.properties
core.management.security-realm.authorization.ldap.username-to-dn=User search configuration where the username is already a distinguished name.
core.management.security-realm.authorization.ldap.user-search.username-to-dn=User search configuration where the username is already a distinguished name.
Duplicated items in File: ./controller/src/main/resources/org/jboss/as/controller/descriptions/common/LocalDescriptions.properties
core.management.security-realm.authorization.ldap.user-search.username-filter.add=Add username fiter.
core.management.security-realm.authorization.ldap.user-search.username-filter.remove=Add username fiter.
Duplicated items in File: ./controller/src/main/resources/org/jboss/as/controller/descriptions/common/LocalDescriptions.properties
@gaol
gaol / gist:92b893fe42dfde5ff30e
Last active Aug 29, 2015
teiid-jboss-integration dependency tree
View gist:92b893fe42dfde5ff30e
[kylin@ksoong jboss-integration]$ mvn dependency:tree
[INFO] Scanning for projects...
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building teiid-jboss-integration 8.11.0.Alpha3-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] --- maven-dependency-plugin:2.8:tree (default-cli) @ teiid-jboss-integration ---
[INFO] org.jboss.teiid:teiid-jboss-integration:jar:8.11.0.Alpha3-SNAPSHOT
[INFO] +- org.jboss.teiid:teiid-runtime:jar:8.11.0.Alpha3-SNAPSHOT:compile
@gaol
gaol / gist:5159223
Created Mar 14, 2013
How to persist one entity once, and refer it after that during one persistence call ?
View gist:5159223
Here is the situation:
Entity A:
-- List<Entity B>
Entity B:
-- List<Entity C>
View gist:4528002
@Entity
@Table(name = "Affected_Product")
public class AffectedProduct implements Serializable{
@Id
@GeneratedValue
private Long id;
@OneToMany(fetch = FetchType.LAZY, mappedBy = "product", cascade = {CascadeType.ALL})
@JoinTable
private Collection<LinkData> fixLocations;
@gaol
gaol / gist:2496466
Created Apr 26, 2012
List of removed files from papaki
View gist:2496466
papaki-1.0.0.Beta3/tools/checkstyle/lib/checkstyle.jar
papaki-1.0.0.Beta3/tools/checkstyle/lib/commons-cli.jar
papaki-1.0.0.Beta3/tools/checkstyle/lib/antlr.jar
papaki-1.0.0.Beta3/tools/checkstyle/lib/google-collect-snapshot.jar
papaki-1.0.0.Beta3/tools/checkstyle/lib/commons-beanutils-core.jar
papaki-1.0.0.Beta3/tools/checkstyle/lib/commons-logging.jar
papaki-1.0.0.Beta3/tools/cobertura/lib/asm-tree-3.0.jar
papaki-1.0.0.Beta3/tools/cobertura/lib/log4j-1.2.9.jar
papaki-1.0.0.Beta3/tools/cobertura/lib/asm-3.0.jar
papaki-1.0.0.Beta3/tools/cobertura/lib/jakarta-oro-2.0.8.jar
@gaol
gaol / gist:2417827
Created Apr 19, 2012
List of removed files from fungal
View gist:2417827
fungal-0.11.0.Beta4/tools/tattletale/lib/tattletale.jar
fungal-0.11.0.Beta4/tools/tattletale/lib/javassist.jar
fungal-0.11.0.Beta4/tools/tattletale/lib/tattletale-ant.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/checkstyle.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/commons-cli.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/antlr.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/google-collect-snapshot.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/commons-beanutils-core.jar
fungal-0.11.0.Beta4/tools/checkstyle/lib/commons-logging.jar
fungal-0.11.0.Beta4/tools/cobertura/lib/asm-tree-3.0.jar
You can’t perform that action at this time.