Commit fbcd06ce authored by Carlos Eduardo Lara Augusto's avatar Carlos Eduardo Lara Augusto
Browse files

[OPENBUS-1533]

Informar o tipo do objeto na hora de criar um proxy para as ofertas de serviço persistidas.
Foi decidido que todas as chamadas a newproxy deveriam receber a alteração.

Este commit replica a correção aplicada no trunk.



git-svn-id: https://subversion.tecgraf.puc-rio.br/engdist/openbus/sdk/lua/branches/OB_SDK_LUA_v1_05_03_2011_07_28@122533 ae0415b3-e90b-0410-900d-d0be9363c56b
parent a2c83e9e
......@@ -6,6 +6,7 @@
local oil = require "oil"
local oop = require "loop.base"
local openbus = require "openbus.Openbus"
local OBUtils = require "openbus.util.Utils"
local ComponentContext = require "scs.core.ComponentContext"
local scsutils = require ("scs.core.utils")()
......@@ -55,7 +56,7 @@ function main ()
io.stderr:write("HelloServer: Erro ao conectar ao barramento.\n")
os.exit(1)
end
registryService = orb:newproxy(registryService, "protected")
registryService = orb:newproxy(registryService, "protected", OBUtils.REGISTRY_SERVICE_INTERFACE)
local suc, id = registryService:register({ properties = {}, member = component.IComponent})
if not suc then
io.stderr:write("HelloServer: Erro ao registrar ofertas.\n")
......
......@@ -75,10 +75,10 @@ function main ()
end
-- Assume que h s uma sesso cadastrada no registro
-- local offers = registryService:find({"ISession_v" .. OBUtils.IDL_VERSION})
local offers = registryService:findByCriteria({"ISession_" .. OBUtils.IDL_VERSION},
local offers = registryService:findByCriteria({"ISession_" .. OBUtils.IDL_VERSION},
{ {name = "sessionName", value = {"HelloSession"}} })
for _, offer in ipairs(offers) do
local member = orb:newproxy(offer.member, "protected")
local member = orb:newproxy(offer.member, "protected", OBUtils.COMPONENT_INTERFACE)
local succ = member:_component()
if succ then
local component = orb:narrow(offer.member, compFacet)
......
......@@ -96,9 +96,9 @@ local function main ()
local comp = orb:narrow(session:_component(), compFacet)
local sink = orb:narrow(comp:getFacet(sinkFacet), sinkFacet)
-- Registro do componente
local registryService = orb:newproxy(rs, "protected")
local registryService = orb:newproxy(rs, "protected", obUtils.REGISTRY_SERVICE_INTERFACE)
local succ, registryId = registryService:register {
properties = {
properties = {
{name = "sessionName", value = {"HelloSession"}},
},
member = comp,
......
......@@ -6,6 +6,7 @@
local oil = require "oil"
local oop = require "loop.base"
local openbus = require "openbus.Openbus"
local Utils = require "openbus.util.Utils"
local ComponentContext = require "scs.core.ComponentContext"
local scsutils = require ("scs.core.utils")()
......@@ -59,7 +60,7 @@ function main ()
io.stderr:write("HelloServer: Erro ao conectar ao barramento.\n")
os.exit(1)
end
registryService = orb:newproxy(registryService, "protected")
registryService = orb:newproxy(registryService, "protected", Utils.REGISTRY_SERVICE_INTERFACE)
local suc, id = registryService:register({
member = component.IComponent,
properties = {
......
......@@ -65,7 +65,7 @@ function main ()
io.stderr:write("HelloServer: Erro ao conectar ao barramento.\n")
os.exit(1)
end
registryService = orb:newproxy(registryService, "protected")
registryService = orb:newproxy(registryService, "protected", Utils.REGISTRY_SERVICE_INTERFACE)
local suc, id = registryService:register({
member = component.IComponent,
properties = {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment