热门标签 | HotTags
当前位置:  开发笔记 > 后端 > 正文

SMP3.0:IntegrationGatewaywithMySQLDatasource(Part2)_MySQL

SMP3.0:IntegrationGatewaywithMySQLDatasource(Part2)
Next step is to enable MySQL's JDBC driver for OSGi , then deploy it to SMP 3.0 server, create OData Modeling & deploy to SMP server.

Enabling MySQL's JDBC driver for OSGi

  1. Since MySQL JDBC driver is not archived as OSGi bundle, so it can not be read and understood by SMP3 (as SMP3 is based on OSGi), hence to make it work we need to create an OSGi enabled bundle which includes MySQL JDBC driver.
  2. Download MySQL's JDBC driver from here .
  3. Open Eclipse>New>Other>Plug-in Development>Plug-in from Existing JAR Archives
  4. Click on ' Add External ' and browse to jar file

18.png

5. Provide some project name

    • Make sure you select Target Platform as Equinox
    • Uncheck unzip the JAR archives into the project

19.png

6. Once done, Right click project> Export>Plug-in Development>Deployable plug-ins and fragments

    • Define some location to store OSGi enabled jar file
    • Click on 'Finish'

20.png

Configure SMP 3.0 server for Integration Gateway JDBC connection

  • As already mentioned above, SMP3 is based on OSGi so it is very much possible to deploy any JDBC driver as OSGi enabled jar package on SMP runtime.

7. Copy the OSGi enabled jar file (in my case, it is at Desktop) , paste it into C:/SAP/MobilePlatform3/server/pickup

    • To verify if jar file has been deployed successfully, open . state folder and see the ' OK ' message

21.png

OData modeling

8. Make sure you have added GWPA plugin in the eclipse. For more information, checkthisdocument.

9. Create an OData project. File>New>Service Implementation Project

10. Check 'Create OData file manually ' option

1.png

11. Create a model file. Right Click Model>New>Other>OData model

    • Give some name for Model i.e. empModel
    • Make sure you have selected 'Blank OData Model ' from Initial Model content option
    • Click on 'Finish'.

1.png

12. Create an Entity model same like your table structure in backend system.

    • Make sure Entityset has the same name as Table name in database
    • All properties should have same name and data type as per table in the database

    • Change the EMPID data type to INT

1.png

13. Right click model>empModel.odata>Implement service

14. Right click empModel.odatasrv>Select Data source as JDBC

25.png

15. Right click project>Generate and Deploy Integration content

    • You may prefer any other name for Service Namespace. By default it is ' sap '.

1.png

Make sure you get a success message.

1.png

NextPart 3

推荐阅读
  • ubuntu用sqoop将数据从hive导入mysql时,命令: ... [详细]
  • Activiti7流程定义开发笔记
    本文介绍了Activiti7流程定义的开发笔记,包括流程定义的概念、使用activiti-explorer和activiti-eclipse-designer进行建模的方式,以及生成流程图的方法。还介绍了流程定义部署的概念和步骤,包括将bpmn和png文件添加部署到activiti数据库中的方法,以及使用ZIP包进行部署的方式。同时还提到了activiti.cfg.xml文件的作用。 ... [详细]
  • 安装mysqlclient失败解决办法
    本文介绍了在MAC系统中,使用django使用mysql数据库报错的解决办法。通过源码安装mysqlclient或将mysql_config添加到系统环境变量中,可以解决安装mysqlclient失败的问题。同时,还介绍了查看mysql安装路径和使配置文件生效的方法。 ... [详细]
  • 最近学习反射机制的时候Properties.load(读取本地文件流的时候怎么也找不到加载文件后面发现IDEA的默认根目录是在它的Project工程下IDEA的文件目录和Ec ... [详细]
  • Mac OS 升级到11.2.2 Eclipse打不开了,报错Failed to create the Java Virtual Machine
    本文介绍了在Mac OS升级到11.2.2版本后,使用Eclipse打开时出现报错Failed to create the Java Virtual Machine的问题,并提供了解决方法。 ... [详细]
  • eclipse学习(第三章:ssh中的Hibernate)——11.Hibernate的缓存(2级缓存,get和load)
    本文介绍了eclipse学习中的第三章内容,主要讲解了ssh中的Hibernate的缓存,包括2级缓存和get方法、load方法的区别。文章还涉及了项目实践和相关知识点的讲解。 ... [详细]
  • 本文介绍了如何清除Eclipse中SVN用户的设置。首先需要查看使用的SVN接口,然后根据接口类型找到相应的目录并删除相关文件。最后使用SVN更新或提交来应用更改。 ... [详细]
  • Week04面向对象设计与继承学习总结及作业要求
    本文总结了Week04面向对象设计与继承的重要知识点,包括对象、类、封装性、静态属性、静态方法、重载、继承和多态等。同时,还介绍了私有构造函数在类外部无法被调用、static不能访问非静态属性以及该类实例可以共享类里的static属性等内容。此外,还提到了作业要求,包括讲述一个在网上商城购物或在班级博客进行学习的故事,并使用Markdown的加粗标记和语句块标记标注关键名词和动词。最后,还提到了参考资料中关于UML类图如何绘制的范例。 ... [详细]
  • 作者表示自己最近工作非常忙碌,无法抽出时间写作。他计划在未来的几天内写关于namespace与C#的名字解析以及数据库内容转化为excel文件下载的知识。 ... [详细]
  • GSIOpenSSH PAM_USER 安全绕过漏洞
    漏洞名称:GSI-OpenSSHPAM_USER安全绕过漏洞CNNVD编号:CNNVD-201304-097发布时间:2013-04-09 ... [详细]
  • Jquery 跨域问题
    为什么80%的码农都做不了架构师?JQuery1.2后getJSON方法支持跨域读取json数据,原理是利用一个叫做jsonp的概念。当然 ... [详细]
  • 本文介绍了使用jQuery实现图片预加载和等比例缩放的方法,同时提供了演示和相关代码。该方法可以重置图片的宽度和高度,并使图片在水平和垂直方向上居中显示。 ... [详细]
  • 本文介绍了在Ubuntu系统中清理残余配置文件和无用内容的方法,包括清理残余配置文件、清理下载缓存包、清理不再需要的包、清理无用的语言文件和清理无用的翻译内容。通过这些清理操作可以节省硬盘空间,提高系统的运行效率。 ... [详细]
  • 本文介绍了Hive常用命令及其用途,包括列出数据表、显示表字段信息、进入数据库、执行select操作、导出数据到csv文件等。同时还涉及了在AndroidManifest.xml中获取meta-data的value值的方法。 ... [详细]
  • 本文介绍了一种求解最小权匹配问题的方法,使用了拆点和KM算法。通过将机器拆成多个点,表示加工的顺序,然后使用KM算法求解最小权匹配,得到最优解。文章给出了具体的代码实现,并提供了一篇题解作为参考。 ... [详细]
author-avatar
阿尔及利亚奥兰叉
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有