Skip to content

Commit

Permalink
Merge pull request #100 from paterczm/master
Browse files Browse the repository at this point in the history
Fixes #99: Using LightblueMetadataProxyServlet instead of deprecated LightblueProxyServlet
  • Loading branch information
dcrissman committed Apr 28, 2015
2 parents c964b0c + 9ebf7a9 commit 95fd53a
Show file tree
Hide file tree
Showing 7 changed files with 41 additions and 9 deletions.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="org.picketlink" />
<module name="com.redhat.lightblue"/>
</dependencies>
</deployment>
<deployment>
<dependencies>
<module name="org.picketlink" />
<module name="com.redhat.lightblue.client.metadata-mgmt"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
2 changes: 1 addition & 1 deletion metadata-mgmt-saml-auth/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<servlet>
<servlet-name>rest-request</servlet-name>
<servlet-class>com.redhat.lightblue.client.http.LightblueProxyServlet</servlet-class>
<servlet-class>com.redhat.lightblue.client.http.servlet.LightblueMetadataProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>rest-request</servlet-name>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package com.redhat.lightblue.applications;

import java.io.IOException;

import javax.enterprise.context.ApplicationScoped;
import javax.enterprise.inject.Disposes;
import javax.enterprise.inject.Produces;

import org.apache.http.impl.client.CloseableHttpClient;

import com.redhat.lightblue.client.LightblueClientConfiguration;
import com.redhat.lightblue.client.PropertiesLightblueClientConfiguration;
import com.redhat.lightblue.client.http.auth.ApacheHttpClients;

public class ApplicationContext {
@Produces
@ApplicationScoped
public LightblueClientConfiguration getLightblueClientConfiguration() {
return PropertiesLightblueClientConfiguration.fromDefault();
}

@Produces
@ApplicationScoped
public CloseableHttpClient getClient(LightblueClientConfiguration config) throws Exception {
return ApacheHttpClients.fromLightblueClientConfiguration(config);
}

public void closeHttpClient(@Disposes CloseableHttpClient client) throws IOException {
client.close();
}
}
Empty file.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<jboss-deployment-structure>
<deployment>
<dependencies>
<module name="com.redhat.lightblue"/>
<module name="com.redhat.lightblue.client.metadata-mgmt"/>
</dependencies>
</deployment>
</jboss-deployment-structure>
2 changes: 1 addition & 1 deletion metadata-mgmt/src/main/webapp/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<servlet>
<servlet-name>rest-request</servlet-name>
<servlet-class>com.redhat.lightblue.client.http.LightblueProxyServlet</servlet-class>
<servlet-class>com.redhat.lightblue.client.http.servlet.LightblueMetadataProxyServlet</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>rest-request</servlet-name>
Expand Down

0 comments on commit 95fd53a

Please sign in to comment.