This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Prepare a builder by copying the scheme, host, port, path, and | |
* query string of an HttpServletRequest. | |
*/ | |
public static CorrectedServletUriComponentsBuilder fromRequest(HttpServletRequest request) { | |
String scheme = scheme(request); | |
String host = host(request); | |
int port = port(request); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Transitively bring in the Spring IO Platform Bill-of-Materials `pom.xml` --> | |
<dependencyManagement> | |
<dependencies> | |
<dependency> | |
<groupId>io.spring.platform</groupId> | |
<artifactId>platform-bom</artifactId> | |
<version>1.1.1.RELEASE</version> | |
<type>pom</type> | |
<scope>import</scope> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<kmodule xmlns="http://jboss.org/kie/6.0.0/kmodule" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<kbase name="BusPassKbase" packages="com.sctrcd.buspassws.rules"> | |
<ksession name="BusPassSession" /> | |
</kbase> | |
</kmodule> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
KieContainer kieContainer = KieServices.Factory.get().getKieClasspathContainer(); | |
KieSession kieSession = kieContainer.newKieSession("BusPassSession"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
public class BusPassApp { | |
public static void main(String[] args) { | |
ApplicationContext ctx = SpringApplication.run(BusPassApp.class, args); | |
} | |
@Bean | |
public KieContainer kieContainer() { | |
return KieServices.Factory.get().getKieClasspathContainer(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Service | |
public class BusPassService { | |
private final KieContainer kieContainer; | |
@Autowired | |
public BusPassService(KieContainer kieContainer) { | |
log.info("Initialising a new bus pass session."); | |
this.kieContainer = kieContainer; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@RestController | |
public class BusPassController { | |
private static Logger log = LoggerFactory.getLogger(BusPassController.class); | |
private final BusPassService busPassService; | |
@Autowired | |
public BusPassController(BusPassService busPassService) { | |
this.busPassService = busPassService; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bea_home=/path/to/bea | |
java_home=/path/to/bea/jdk160_18 | |
domain_template=/path/to/bea/weblogic11/common/templates/domains/wls.jar | |
admin_server_name=my_admin_server | |
admin_url=t3\://myserver\:7001 | |
admin_user=weblogic | |
admin_password=w3blogicpwd | |
admin_port=7001 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ---------------------------------------------------------------------- | |
# Example of connecting to a running JMS server and getting stats. | |
# ---------------------------------------------------------------------- | |
import java.lang.Thread | |
def get_messaging_stats(): | |
print 'Searching for JMS connections...' | |
# Hard-codes the JMS server name. You will probably want to parameterize this. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -------------------------------------------------- | |
# Use WLST to connect to running WebLogic application servers and | |
# output a list of database connection pools and their sizes. | |
# | |
# This can be used for health monitoring and to support tuning. | |
# -------------------------------------------------- | |
import java.lang.Thread | |
def get_connection_pool_sizes(): |
OlderNewer