发表于: 2017-11-26 23:39:41

1 731


今天完成的事情:  

完成分布式部署客户端代码,

<context:component-scan base-package="jins"/>
<!--<context:property-placeholder location="classpath:*.properties"/>-->
<!--&lt;!&ndash;加入jdbc.properties,当自动扫描mapper.xml确定到和jdbc.properties不是同一级目录下&ndash;&gt;-->
<!--<context:property-placeholder location="classpath:jdbc.properties" />-->

<!--rmi-->
<bean id="StudentService2" class="org.springframework.remoting.rmi.RmiProxyFactoryBean" lazy-init="true">
   <property name="serviceUrl" value="rmi://127.0.0.1:8100/StudentService2"/>
   <property name="serviceInterface" value="jins.service.StudentService"/>
</bean>


<bean id="StudentService1" class="org.springframework.remoting.rmi.RmiProxyFactoryBean" lazy-init="true">
   <property name="serviceUrl" value="rmi://127.0.0.1:8200/StudentService1"/>
   <property name="serviceInterface" value="jins.service.StudentService"/>
</bean>


可以启动 但是出现比较多的问题.


明天计划的事情:

结束任务8,

完善一下代码,开始任务9


遇到的困难:

服务端同时启动报错两个service没有选择进入顺序.,一般是在Random里面没有配置好加载顺序,

 java.rmi.server.ExportException : remote object implements illegal remote interface; nested exception is : java.lang.IllegalArgumentException : illegal remote method encountered : ,

解决方法 :若提示这样的错误说明接口函数未设置异常抛出,在所提示的函数后面加上throw RemoteException即可解决


错误 2:exception: java.rmi.UnmarshalException: error unmarshalling return; nested exception is: java.io.WriteAbortedException: writing aborted; java.io.NotSerializableException :

解决方法:若提示这样的错误说明某个类是不能序列化的,需要在该类加上implements Serializable,即可解决

真不巧,,,这两个 问题都被我遇到了....


两个bean的经典问题.....这个好说


还有最后一个问题,,也是卡的比较久的,现在还没有解决,,方法不支持远程对象,,,


收获:

解决了N多bug,,感觉回到了前几个任务.


任务进度:任务8步骤3

任务开始时间:2017-11-23

预计demo时间:2017-11-27

是否有延期风险:暂无

禅道:http://task.ptteng.com/zentao/task-view-14238.html



返回列表 返回列表
评论

    分享到