Skip to content

Commit 9d322ec

Browse files
committed
Merge pull request #3 from carlosvasquez/master
Release de la versión 1.4
2 parents a8cbe29 + b189b73 commit 9d322ec

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+4651
-387
lines changed

pom.xml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,28 @@
33
<modelVersion>4.0.0</modelVersion>
44
<groupId>org.devdom</groupId>
55
<artifactId>developer-influencer</artifactId>
6-
<version>1.0</version>
6+
<version>1.4</version>
77
<packaging>war</packaging>
88
<name>developer-influencer</name>
99
<organization>
1010
<name>Developers Dominicanos</name>
1111
<url>http://developers.do</url>
1212
</organization>
13+
<developers>
14+
<developer>
15+
<name>Carlos Vásquez Polanco</name>
16+
<email>[email protected]</email>
17+
<url>http://www.linkedin.com/in/carlosvasquez</url>
18+
<organization>Developers Dominicanos</organization>
19+
<organizationUrl>http://developers.do</organizationUrl>
20+
<properties>
21+
<project>Developers Influyentes</project>
22+
</properties>
23+
</developer>
24+
</developers>
1325
<scm>
1426
<url>https://github.com/developersdo/developer-influencers</url>
27+
<developerConnection>https://github.com/carlosvasquez/developer-influencers</developerConnection>
1528
</scm>
1629
<properties>
1730
<endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
@@ -65,6 +78,12 @@
6578
<version>2.5</version>
6679
<scope>provided</scope>
6780
</dependency>
81+
<dependency>
82+
<groupId>junit</groupId>
83+
<artifactId>junit</artifactId>
84+
<version>4.10</version>
85+
<scope>test</scope>
86+
</dependency>
6887
<dependency>
6988
<groupId>javax</groupId>
7089
<artifactId>javaee-api</artifactId>

src/main/java/org/devdom/client/facebook/Callback.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void updateMember(FacebookProfile profile) throws Exception{
9696
em.getTransaction().begin();
9797
FacebookMember member = new FacebookMember();
9898
member.setUid(profile.getUid());
99-
member.setBirthdayDate(Utils.getDateFormatted(profile.getBirthday(),"MM/dd/yyyy"));
99+
member.setBirthdayDate(profile.getBirthday());
100100
member.setFirstName(profile.getFirstName());
101101
member.setLastName(profile.getLastName());
102102
member.setPic(profile.getPic_with_logo());
Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,60 +1,17 @@
11
package org.devdom.tracker;
22

3-
import org.eclipse.jetty.server.Server;
4-
import org.eclipse.jetty.server.handler.ErrorHandler;
5-
import org.eclipse.jetty.servlet.ServletContextHandler;
6-
import org.eclipse.jetty.servlet.ServletHandler;
7-
import org.eclipse.jetty.webapp.WebAppContext;
8-
93
/**
104
*
115
* @author Carlos Vásquez Polanco
126
*/
137
public class Main {
148

159
public static void main(String[] args) throws Exception{
16-
17-
String webappDirLocation = "src/main/webapp/";
18-
19-
ErrorHandler errorHandler = new ErrorHandler();
20-
errorHandler.setShowStacks(true);
21-
22-
ServletHandler servletHandler = new ServletHandler();
23-
//servletHandler.addServletWithMapping(org.devdom.skills.service.ErrorHandlerResource.class.getName(),"/");
24-
25-
// The port that we should run on can be set into an environment variable
26-
// Look for that variable and default to 8080 if it isn't there.
27-
String webPort = System.getenv("PORT");
28-
if (webPort == null || webPort.isEmpty()) {
29-
webPort = "8082";
30-
}
3110

32-
Server server = new Server(Integer.valueOf(webPort));
33-
WebAppContext root = new WebAppContext();
34-
35-
ServletContextHandler sch = new ServletContextHandler(server, "");
36-
//sch.setSecurityHandler(getSecurityHandler());
37-
38-
root.setContextPath("/");
39-
root.setDescriptor(webappDirLocation + "/WEB-INF/web.xml");
40-
root.setResourceBase(webappDirLocation);
41-
root.setDisplayName("Dev Dom - Influyentes");
42-
root.setHandler(servletHandler);
43-
root.setSecurityHandler(null);
44-
45-
// Parent loader priority is a class loader setting that Jetty accepts.
46-
// By default Jetty will behave like most web containers in that it will
47-
// allow your application to replace non-server libraries that are part of the
48-
// container. Setting parent loader priority to true changes this behavior.
49-
// Read more here: http://wiki.eclipse.org/Jetty/Reference/Jetty_Classloading
50-
root.setParentLoaderPriority(true);
51-
//server.setHandler(server);
52-
server.addBean(errorHandler);
53-
//server.setHandler(servletHandler);
54-
55-
server.setHandler(root);
11+
Runnable worker = new Worker();
12+
Thread thread = new Thread(worker);
13+
thread.setName("w");
14+
thread.start();
5615

57-
server.start();
58-
server.join();
5916
}
6017
}
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
package org.devdom.tracker;
2+
3+
import javax.servlet.ServletContextEvent;
4+
5+
/**
6+
*
7+
* @author Carlos Vasquez Polanco
8+
*/
9+
public class Start implements javax.servlet.ServletContextListener{
10+
11+
private final Runnable worker = new Worker();
12+
private final Thread thread = new Thread(worker);
13+
14+
@Override
15+
public void contextInitialized(ServletContextEvent sce) {
16+
thread.setName("w");
17+
thread.start();
18+
}
19+
20+
@Override
21+
public void contextDestroyed(ServletContextEvent sce) {
22+
thread.stop();
23+
}
24+
25+
}

0 commit comments

Comments
 (0)