Extensions loaded in not isolated classloader

Post here your questions about SFS2X. Here we discuss all server-side matters. For client API questions see the dedicated forums.

Moderators: Lapo, Bax

User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Extensions loaded in not isolated classloader

Postby Lapo » 23 Jan 2018, 15:25

Hi,
1. is there is any other solution for this issue, instead of replacing the jars inside smartfox? The issue can happen in any kind of jar, and not only this one.

What is exactly the jar you've problems with?

2. Another question is, what would you suggest is the right way for using Spring inside an extension?

I would suggest to avoid Spring :)
It's a library for very hefyy projects with a large team of devs, tons of dependencies, complex build processes... I don't know, SFS2X Extensions rarely fall into this category. Imho, don't try to crack a nut with a bulldozer.

Unfortunately we don't have suggestions for Spring. I have rarely seen anyone using it in this context, not even the largest projects that run on 50+ SFS instances.

3. Another question about the class loader is: will it add XML files to the class path or only jars? currently it looks to us that only jar work

In terms of accessing files the classpath points to the SFS2X/ folder so you can use that as a point of reference to build your relative paths.
If you mean loading XML files from within a JAR file, that won't work.

Hope it helps
Lapo
--
gotoAndPlay()
...addicted to flash games
maimonoded
Posts: 26
Joined: 14 Jul 2010, 13:44

Re: Extensions loaded in not isolated classloader

Postby maimonoded » 23 Jan 2018, 18:26

1. same jar as the original post
2.1. you probably correct about spring, but it is pretty much one of the most used frameworks in the java world, another thing about spring is that it is a cherry picking, you can use what you want and not the entire framework, so in this case it is not a bulldozer as you think it is. we are using it with smartfox for 6 years now and it reduced our amount of development time magnificently
2.2. not supporting
3. in your point of view, support loading XML's from a jar file doesn't seems like a normal use case?
User avatar
Lapo
Site Admin
Posts: 20392
Joined: 21 Mar 2005, 09:50
Location: Italy

Re: Extensions loaded in not isolated classloader

Postby Lapo » 24 Jan 2018, 09:36

Code: Select all

in your point of view, support loading XML's from a jar file doesn't seems like a normal use case?

If we had a list of "top wanted" features I think this one wouldn't make it in the first 100. In any case it's been added to our to-do list.
We should be able to add it in the next release.

As regards the class loading issue and being able to load multiple copies of the same libraries, this is a more complex subject as changing the behavior of class loaders will potentially break existing server-side code. I don't have a precise timeline for this at the moment.

Thanks
Lapo

--

gotoAndPlay()

...addicted to flash games
maimonoded
Posts: 26
Joined: 14 Jul 2010, 13:44

Re: Extensions loaded in not isolated classloader

Postby maimonoded » 30 Jan 2018, 20:15

it will be nice to get this feature.
thanks

Return to “SFS2X Questions”

Who is online

Users browsing this forum: No registered users and 20 guests