无需使用GPL即可使用Java连接到MySQL [英] Connecting to MySQL in Java without having to go GPL

查看:88
本文介绍了无需使用GPL即可使用Java连接到MySQL的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在用Java编写一个软件,该软件需要连接到在线数据库才能收集一些信息!我想在我的公司下销售该软件,但问题是Oracle已根据GPL许可了JDBC驱动程序,我是正确的,这意味着除其他限制外,我无法以任何方式重新发行驱动程序!

I am writing a piece of software in Java that needs to connect to an online database in order to collect some information! I want to sell this software under my company, but the problem is Oracle has licenced the JDBC driver under GPL, which, I am correct, means that I can not redistrubute the driver in any way, amongst other limitations!

我能看到的唯一替代方法是使用PostgreSQL,因为据我所知,该驱动程序是根据BSD许可的,这意味着您基本上可以做到每件事喜欢它。但是我已经与我的网络托管服务商 JustHost 进行了交谈,他们基本上说他们不支持PostgreSQL,也没有计划,因此,如果我想与他们一起托管PostgreSQL数据库,我将不得不购买专用服务器,我可能会毫不客气地添加。不过他们很诚实,他们确实说过转移到另一家支持PostgreSQL的网络托管公司会便宜!

The only alternative I can see is to use PostgreSQL, as the driver is licenced under BSD as far as I am aware, which means that you can basically do what every you like with it. But I have spoken with my web host, JustHost and they have basically said that they do not support PostgreSQL and have no plans to, so if I wanted to host a PostgreSQL database with them I would have to pay for a dedicated server, rather rudely may I add. They was quite honest though, and they did say it would be cheaper to transfer to another web hosting company who support PostgreSQL!

最后,我只能使用简单的文本文件来传输信息。但是我唯一担心的是安全性。存储在数据库中的某些信息实际上是机密的,实际上,最机密的数据将是许可证密钥,甚至是电子邮件。显然,这是在我首次使用时验证用户许可证密钥时使用的。不过,也许并不是那么不安全,我只是认为人们可以很容易地编辑文件以适应那里的需求,等等。

As a last resort, I could just use a simple text file to transfer the information. But my only worry here is security. Some of the information stored in the database is confidential, well, actually, the data that is most confidential it will be licence keys, and maybe emails. This is obviously for when I validate the users licence key upon first use. Maybe it's not so insecure though, I just thought it would be very easy for people to edit the file to suit there needs, etc.

我确实认为某种php脚本可以从Java与之通信的文本文件中提供请求的信息可能更安全,但是同样,我也不是安全专家,所以我也不知道,尤其是好像我在使用共享主机一样,

I did think that some kind of php script to provide requested information from a text file that the Java would communicate with may be more secure, but again, I'm not a security expert so I don't know, especially seeing as though I am using a shared host and am not paying for 'https'!

所以基本上,我想知道鉴于我的情况您会怎么做。您以前经历过这种困境吗?如果是这样,您该怎么办?你会推荐什么?等等。

So basically, I would like to know what you would do given my situation please. Have you experienced this dilema before? If so, what do you do? What would you recomend? etc.

推荐答案

提供网络服务来传输数据的小型服务器应用程序呢?那么只有该服务器应用程序实际上才需要JDBC驱动程序。

What about a small server app that provides webservices to transfer the data? Then only that server app would actually need the JDBC driver.

编辑:
对于Web服务,请查看JAX-WS(这是 java.net参考实现)。

使用可以加密的网络服务使用Java的内置加密库对数据进行处理,传输加密的日期并在客户端上解密。此外,您可能会为数据传输一些散列(例如MD5),以确保它没有被更改。

Using web serices you could encrypt the data using Java's built-in encryption library, transfer the encrypted date and decrypt on the client. Additionally you might transfer some hash (MD5 for example) for the data to ensure it has not been changed.

这篇关于无需使用GPL即可使用Java连接到MySQL的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆