Skip to content

Commit 601cdce

Browse files
committed
JMX
1 parent c53f281 commit 601cdce

File tree

9 files changed

+132
-1
lines changed

9 files changed

+132
-1
lines changed

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,5 @@
33
/spring-capgemini-web/target/
44
/spring-capgemini-jaxb/target/
55
/ws-client/target/
6-
/spring-jms/target/
6+
/spring-jms/target/
7+
/spring-jmx/target/

pom.xml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
<module>spring-capgemini-jaxb</module>
1414
<module>ws-client</module>
1515
<module>spring-jms</module>
16+
<module>spring-jmx</module>
1617
</modules>
1718
<properties>
1819
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>

spring-jms/src/main/java/pl/altkom/spring/jms/SenderMain.java

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public static void main(String[] args) {
3030
@Override
3131
public Message createMessage(Session sn) throws JMSException {
3232
TextMessage message = sn.createTextMessage("ala ma kota");
33+
3334
return message;
3435
}
3536
});

spring-jmx/nb-configuration.xml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project-shared-configuration>
3+
<!--
4+
This file contains additional configuration written by modules in the NetBeans IDE.
5+
The configuration is intended to be shared among all the users of project and
6+
therefore it is assumed to be part of version control checkout.
7+
Without this configuration present, some functionality in the IDE may be limited or fail altogether.
8+
-->
9+
<spring-data xmlns="http://www.netbeans.org/ns/spring-data/1">
10+
<config-files>
11+
<config-file>src/main/resources/spring-context.xml</config-file>
12+
</config-files>
13+
<config-file-groups/>
14+
</spring-data>
15+
</project-shared-configuration>

spring-jmx/pom.xml

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>pl.altkom.spring</groupId>
6+
<artifactId>spring-capgemini</artifactId>
7+
<version>1.0-SNAPSHOT</version>
8+
</parent>
9+
<artifactId>spring-jmx</artifactId>
10+
<packaging>jar</packaging>
11+
<dependencies>
12+
<dependency>
13+
<groupId>org.springframework</groupId>
14+
<artifactId>spring-context</artifactId>
15+
</dependency>
16+
</dependencies>
17+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright 2014-11-21 the original author or authors.
3+
*/
4+
5+
package pl.altkom.spring.spring.jmx;
6+
7+
import org.springframework.context.ApplicationContext;
8+
import org.springframework.context.support.ClassPathXmlApplicationContext;
9+
10+
/**
11+
*
12+
* @author Adrian Lapierre <[email protected]>
13+
*/
14+
public class Main {
15+
16+
public static void main(String[] args) {
17+
18+
ApplicationContext ctx =
19+
new ClassPathXmlApplicationContext("spring-context.xml");
20+
21+
}
22+
23+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/*
2+
* Copyright 2014-11-21 the original author or authors.
3+
*/
4+
5+
package pl.altkom.spring.spring.jmx;
6+
7+
/**
8+
*
9+
* @author Adrian Lapierre <[email protected]>
10+
*/
11+
public class MyBean {
12+
13+
private String name;
14+
private int age;
15+
private boolean isSuperman;
16+
17+
public String getName() {
18+
return name;
19+
}
20+
21+
public void setName(String name) {
22+
this.name = name;
23+
}
24+
25+
public int getAge() {
26+
return age;
27+
}
28+
29+
public void setAge(int age) {
30+
this.age = age;
31+
}
32+
33+
public boolean isIsSuperman() {
34+
return isSuperman;
35+
}
36+
37+
public void setIsSuperman(boolean isSuperman) {
38+
this.isSuperman = isSuperman;
39+
}
40+
41+
public void dontExposeMe() {
42+
throw new RuntimeException();
43+
}
44+
45+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
### direct log messages to stdout ###
2+
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
3+
log4j.appender.stdout.Target=System.out
4+
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
5+
log4j.appender.stdout.layout.ConversionPattern=%d %5p %c%l:%L - %m%n
6+
7+
log4j.rootLogger=WARN, stdout
8+
log4j.logger.pl.altkom=DEBUG
9+
log4j.logger.org.springframework=INFO
10+
log4j.logger.org.hibernate=INFO
11+
12+
#log4j.logger.org.hibernate.type=TRACE
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans xmlns="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:c="http://www.springframework.org/schema/c"
5+
xmlns:context="http://www.springframework.org/schema/context"
6+
xmlns:lang="http://www.springframework.org/schema/lang"
7+
xmlns:p="http://www.springframework.org/schema/p"
8+
xmlns:util="http://www.springframework.org/schema/util"
9+
10+
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
11+
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
12+
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.0.xsd
13+
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.0.xsd
14+
">
15+
16+
</beans>

0 commit comments

Comments
 (0)