Hi,

Rony G. Flatscher wrote:
Hi Jürgen,

No, you need not use the same component context, but it may be more
performant to choose one within your process. Please use the singleton
entry

"com.sun.star.reflection.theCoreReflection"

for the sole reason that it internally caches created IdlClass objects.


The above mentioned caching would be very important for my application I think (it's an additional means of allowing a scripting language - ooRexx - to drive UNO via Java; the present experimental solution works already - even via the OOo scripting framework; but studying Star Basic and the Python implementation, people may be accustomed to not to request the interface objects explicitly but rather rely on the plumbing of the script engines to do that for them under the cover; therefore I would like to achieve the same, but need the Java reflection handy, preferably without the need to establish a connection to an office upfront).

implement the core reflection in Java -> working directly on the type library. But of course it will be a lot of work when you want a Java only solution, because the storage format of the type library is acced by using a C/C++ API which is not available in Java. So you would need a jni wrapper or something like that and even then it wouldn't be Java only.


In your example you bootstrap a new fresh Java UNO env. I assume that the singleton is not registered in this env but when you use the native bootstrap mechanism or use the context from an office this singleton should be registered.


Well, is there a (any) way to create that object (which should cache the created IdlClass objects) on my own and register it with the received initial context?

If not, is there another way you may think of to get that object registered without first connecting to an office instance (this should be even more important in the future, if using UNO components outside of office?)?

you can prepare a minimal UNO env and can use uno.exe as UNO server where you connect to or you can prepare your application to make use of an own UNO environment (own uno.ini, own type library, ...) and use the native bootstrap function.

Juergen


This can maybe considered as bug and you can submit one or an request for enhancement if you want.


Well, I could do that, if you think this to be an important feature for others as well. But for the time being I am after any solution which works now with 1.1.4 and 1.9.* and up. So any ideas, hints are highly appreciated!

Regards,

---rony


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to