-1

I'm creating a java application and I want that the user pay a monthly subscription to use it. Concretly the user will go on my web site, create an account and pay the subscription. After he download the java application. When He start it the application will ask for a login and a password and after open the application.

I search for the JWS but I have a few questions:

  • Do you have another better solution ?
  • If i use JWS where is store my BDD ?
  • How to be sure that my application can be access online with the jar ?
  • If the BDD is online, how can i secure the BDD's connection login/password ?

Thanx you.

1 Answers1

0

I search for the JWS but I have a few questions:

  1. Do you have another better solution ?

Not at this time. And unfortunately JWS is no longer supported (Java 11 onwards) which makes it an increasingly poor option. See the following:

  1. If i use JWS where is store my BDD ?

If it is a flat-file database you could make it available for download from the same server you are serving your application's JAR file.

If it is an online database ... well you could host it on any cloud computing platform that lets you run a public facing database. (But see below.)

  1. How to be sure that my application can be access online with the jar ?

Not sure what you mean by this. But there are lots of options for hosting websites .... which is all you need for JWS. Some are high availability.

  1. If the BDD is online, how can i secure the BDD's connection login/password ?

Difficult.

You can secure the connection to the database using SSL. But the problem is that the application needs to access the database. That means that the app needs the account and password. If you embed the credentials in your application, the user will be able to extract them. (No matter what you do!)

That may be acceptable, but you need to be very sure. Because once the details are known, it will be difficult to change them without breaking the application for all users.

IMO, exposing an online database is a bad idea. You would be better off setting up a service that accepts requests from your application and validates them before performing a query (or update) against a backend database. This also makes it easier to implement the subscription checking. You just do it in the server.

Community
  • 1
  • 1
Stephen C
  • 698,415
  • 94
  • 811
  • 1,216