Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 2c23cc1
Showing
78 changed files
with
6,117 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
target | ||
test-output | ||
.classpath | ||
.settings | ||
.project | ||
.clover | ||
.externalToolBuilders | ||
src/main/webapp/META-INF/MANIFEST.MF |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
A mobile web enabled RichFaces 4.0 application supporting features | ||
like device detection, CSS3 transitions, orientation support, and more. | ||
|
||
---------------------- | ||
TweetStream Setup | ||
----------------------- | ||
|
||
- This application was made for JBoss AS 6 final. | ||
|
||
- Configure twitter4j for API access | ||
- See instructions below | ||
|
||
- Build using standard maven commands: mvn package | ||
|
||
- Deploy to JBoss AS 6 and start the server | ||
- Copy /tweetstream/target/tweetstream.war to | ||
$JBOSS_HOME/server/default/deploy | ||
- Remember to start with the "./run.sh -b 0.0.0.0" | ||
for access from other devices | ||
|
||
- Access the application at http://localhost:8080/tweetstream | ||
- Or from other devices at http://your.ip:8080/tweetstream | ||
- May require firewall updated, etc.. | ||
|
||
---------------- | ||
Twitter4j Config | ||
---------------- | ||
Everything is setup and configured for twitter4j except the API | ||
credentials. We can not provide public credentials for accessing | ||
twitter API's via twitter4j. This mean you will need to get and | ||
create your own credentials following the twitter4j and twitter | ||
instructions. | ||
|
||
This is really not too hard, but does require some effort. Because | ||
these steps change from time to time you should see | ||
http://twitter4j.org/en/configuration.html and | ||
https://dev.twitter.com/pages/auth for the details. | ||
|
||
Once you have access to the values here: | ||
|
||
oauth.consumerKey=************************** | ||
oauth.consumerSecret=************************** | ||
oauth.accessToken=************************** | ||
oauth.accessTokenSecret=************************** | ||
|
||
Update tweetstream/src/main/resources/twitter4j.properties with these | ||
values. From there you should be able to build and run the application. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<ejb-jar xmlns="http://java.sun.com/xml/ns/javaee" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | ||
http://java.sun.com/xml/ns/javaee/ejb-jar_3_1.xsd" | ||
version="3.1"> | ||
</ejb-jar> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,192 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<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/maven-v4_0_0.xsd"> | ||
<modelVersion>4.0.0</modelVersion> | ||
<groupId>org.richfaces.examples.tweetstream</groupId> | ||
<artifactId>jbw</artifactId> | ||
<packaging>jar</packaging> | ||
<name>tweetstream-jbw</name> | ||
<version>1.0.0-SNAPSHOT</version> | ||
|
||
<parent> | ||
<groupId>org.richfaces.examples.tweetstream</groupId> | ||
<artifactId>parent</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
|
||
<repositories> | ||
<!-- Several key Java EE APIs and RIs are missing from the Maven Central Repository --> | ||
<!-- The goal is to eventually eliminate the reliance on the JBoss repository --> | ||
<repository> | ||
<id>jboss-public-repository-group</id> | ||
<name>JBoss Public Maven Repository Group</name> | ||
<url>https://repository.jboss.org/nexus/content/groups/public/</url> | ||
<layout>default</layout> | ||
<releases> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</releases> | ||
<snapshots> | ||
<enabled>true</enabled> | ||
<updatePolicy>never</updatePolicy> | ||
</snapshots> | ||
</repository> | ||
</repositories> | ||
|
||
|
||
<dependencies> | ||
|
||
<dependency> | ||
<groupId>javax.enterprise</groupId> | ||
<artifactId>cdi-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- EJB --> | ||
<dependency> | ||
<groupId>org.jboss.ejb3</groupId> | ||
<artifactId>jboss-ejb3-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Common annotations (e.g., @PostConstruct, @PreDestroy, @Generated, @Resource) --> | ||
<dependency> | ||
<groupId>javax.annotation</groupId> | ||
<artifactId>jsr250-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Bean Validation (JSR-303) --> | ||
<dependency> | ||
<groupId>javax.validation</groupId> | ||
<artifactId>validation-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- Bean Validation Implementation --> | ||
<!-- Provides portable constraints such as @NotEmpty, @Email and @Url --> | ||
<!-- Hibernate Validator is only the JSR-303 implementation at the moment, so we can assume it's provided --> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-validator</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<!-- JSF --> | ||
<dependency> | ||
<groupId>javax.faces</groupId> | ||
<artifactId>jsf-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>javax.faces</groupId> | ||
<artifactId>jsf-impl</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- JPA --> | ||
<dependency> | ||
<groupId>javax.persistence</groupId> | ||
<artifactId>persistence-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!-- Optional, but highly recommended. --> | ||
<dependency> | ||
<groupId>org.testng</groupId> | ||
<artifactId>testng</artifactId> | ||
<scope>test</scope> | ||
<classifier>jdk15</classifier> | ||
</dependency> | ||
|
||
<!-- Needed on JBoss AS as EL is out of date --> | ||
<dependency> | ||
<groupId>org.glassfish.web</groupId> | ||
<artifactId>el-impl</artifactId> | ||
<scope>runtime</scope> | ||
<!-- FIXME this version should be in the Weld API BOM --> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>javax.el</groupId> | ||
<artifactId>el-api</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.weld</groupId> | ||
<artifactId>weld-core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<!--<dependency>--> | ||
<!--<groupId>org.jboss.weld</groupId>--> | ||
<!--<artifactId>weld-extensions</artifactId>--> | ||
<!--<version>1.0.0.Beta1</version>--> | ||
<!--<scope>provided</scope>--> | ||
<!--</dependency>--> | ||
|
||
<dependency> | ||
<groupId>org.jboss.logging</groupId> | ||
<artifactId>jboss-logging</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.seam.solder</groupId> | ||
<artifactId>seam-solder</artifactId> | ||
</dependency> | ||
|
||
|
||
<dependency> | ||
<groupId>org.jboss.jbw2011.keynote</groupId> | ||
<artifactId>demo-persistence</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-core</artifactId> | ||
<version>3.6.3.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-entitymanager</artifactId> | ||
<version>3.6.3.Final</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate.ogm</groupId> | ||
<artifactId>hibernate-ogm-core</artifactId> | ||
<version>3.0.0-SNAPSHOT</version> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.infinispan</groupId> | ||
<artifactId>infinispan-core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.twitter4j</groupId> | ||
<artifactId>twitter4j-core</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.twitter4j</groupId> | ||
<artifactId>twitter4j-stream</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.richfaces.examples.tweetstream</groupId> | ||
<artifactId>shared</artifactId> | ||
<version>1.0.0-SNAPSHOT</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.jboss.spec</groupId> | ||
<artifactId>jboss-javaee-6.0</artifactId> | ||
<scope>provided</scope> | ||
<version>1.0.0.Final</version> | ||
<type>pom</type> | ||
</dependency> | ||
</dependencies> | ||
</project> |
Binary file not shown.
Binary file not shown.
Binary file added
BIN
+6 KB
jbw/src/main/java/org/richfaces/examples/tweetstream/dataserver/.DS_Store
Binary file not shown.
Binary file added
BIN
+6 KB
jbw/src/main/java/org/richfaces/examples/tweetstream/dataserver/listeners/.DS_Store
Binary file not shown.
9 changes: 9 additions & 0 deletions
9
...n/java/org/richfaces/examples/tweetstream/dataserver/listeners/ServerContentListener.java
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
package org.richfaces.examples.tweetstream.dataserver.listeners; | ||
|
||
/** @author <a href="mailto:jbalunas@redhat.com">Jay Balunas</a> */ | ||
|
||
public interface ServerContentListener | ||
{ | ||
|
||
void startServerListener(); | ||
} |
Oops, something went wrong.