Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[jersey-dev] how do I get these features when using Glassfish (payara)

I am using Payara server(payara-5.2020.7) . The thing is, this application is an old Ant
application and we have just copied additional jar dependencies in the
lib section for the ejb app.

I successfully built a stand alone jersey-client application of the
client. Now, I am trying to integrate that logic into the ejb app. Thing
is, I seem to have a couple pieces of code for which there seems to be
a missing dependency.

One, is using the HttpAuthentication feature. These are the pieces that
show errors when I try to use them with my Payara app server.

HttpAuthentication Feature.

```
HttpAuthenticationFeature feature =
    HttpAuthenticationFeature.basic(user, pass);
client.register(feature);
```

Use the client builder to build the client. Is there a different method
for build the client when using Glassfish?

```
client = ClientBuilder.newBuilder()
    .property(LoggingFeature.LOGGING_FEATURE_VERBOSITY_CLIENT,
    LoggingFeature.Verbosity.PAYLOAD_ANY)
    .property(LoggingFeature.LOGGING_FEATURE_LOGGER_LEVEL_CLIENT,
    "INFO").build();
```

The following are the missing imports when using Glassfish.

```
import org.glassfish.jersey.client.authentication.HttpAuthenticationFeature;
import org.glassfish.jersey.logging.LoggingFeature;
```

Any tips on this?

Brian
-- 
Brian Lavender
http://www.brie.com/brian/

"There are two ways of constructing a software design. One way is to
make it so simple that there are obviously no deficiencies. And the other
way is to make it so complicated that there are no obvious deficiencies."

Professor C. A. R. Hoare
The 1980 Turing award lecture


Back to the top