[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-25 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/jena/pull/401


---


[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-17 Thread afs
Github user afs commented on a diff in the pull request:

https://github.com/apache/jena/pull/401#discussion_r182128407
  
--- Diff: 
apache-jena-osgi/jena-osgi/src/main/resources/META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
 ---
@@ -1,4 +1,4 @@
-org.apache.jena.system.InitJenaCore
+org.apache.jena.sys.InitJenaCore
--- End diff --

I hope this debt isn't too bad because it can be signalled via deprecation. 
As ever, there is a balance.

The services filename ATM is 
`org.apache.jena.system.JenaSubsystemLifecycle`. I'm happy to and have a 
interface `...system.JenaSubsystemLifecycle` to make the transition not too 
abrupt.

(
Speculative thought, maybe trying too hard:

Can we actually move initialization all to jena-arq and just leave 
`Serializer` behind? `InitARQ` would call to be non-lifecycle managed 
initialization code in jena-core. That fixes the jena-core/jena-arq 
relationship. This may be less debt in the sense that it is a relationship the 
code depends on anyway. 

People using only jena-core aren't impacted - we actively discourage that 
but it happens. jena-core initialization happens via services currently but it 
can be dropped as it is using "services" to call itself, so that flexibility is 
unnecessary and it can just call itself in a fixed fashion.
)



---


[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-17 Thread ajs6f
Github user ajs6f commented on a diff in the pull request:

https://github.com/apache/jena/pull/401#discussion_r182101777
  
--- Diff: 
apache-jena-osgi/jena-osgi/src/main/resources/META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
 ---
@@ -1,4 +1,4 @@
-org.apache.jena.system.InitJenaCore
+org.apache.jena.sys.InitJenaCore
--- End diff --

+1 to honesty. I hear tell it's the best policy :) In all seriousness, the 
alternative seems to me to build up debt.


---


[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-17 Thread afs
Github user afs commented on a diff in the pull request:

https://github.com/apache/jena/pull/401#discussion_r182097398
  
--- Diff: jena-arq/src/main/java/org/apache/jena/system/JenaInit.java ---
@@ -0,0 +1,40 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.jena.system;
+
+import org.apache.jena.sys.JenaSystem;
+
+/**
+ * This is a temporary adapter for implementations to transition to 
[JENA-1524]
+ */
+public class JenaInit {
--- End diff --

I'd prefer this to be called "JenaSystem" then init() is 

```
  @Deprecated
  public static void init() {
 org.apache.jena.sys.JenaSystem.init();
   }
```

because this will work with existing code.  If that's OK, I will do that as 
part of the merge.


---


[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-17 Thread afs
Github user afs commented on a diff in the pull request:

https://github.com/apache/jena/pull/401#discussion_r182099487
  
--- Diff: 
apache-jena-osgi/jena-osgi/src/main/resources/META-INF/services/org.apache.jena.system.JenaSubsystemLifecycle
 ---
@@ -1,4 +1,4 @@
-org.apache.jena.system.InitJenaCore
+org.apache.jena.sys.InitJenaCore
--- End diff --

Ouch! Yes, the initialization services classes will be impacted.

That means any customer extensions change but an intermediate subclass of 
JenaSubsystemLifecycle in the new "systems" package should provide a bridge.

Or we can be honest and announce to custom extensions there are changes 
they need to be aware of.


---


[GitHub] jena pull request #401: [JENA-1524] org.apache.jena.system is split by org.a...

2018-04-15 Thread christopher-johnson
GitHub user christopher-johnson opened a pull request:

https://github.com/apache/jena/pull/401

 [JENA-1524] org.apache.jena.system is split by org.apache.jena.arq and 
org.apache.jena.core

per @afs 

> this renames of "jena-core:org.apache.jena.system" as 
"jena-core:org.apache.jena.sys", and puts an adapter class `JenaInit` in 
"jena-arq:org.apache.jena.system" that has two functions to call the real init 
and shutdown. 
> 
> `JenaInit` will be deprecated prior to removal quite quickly (in a very 
few release cycles).
> 
> This way the impact is lessened: `org.apache.jena.system.Txn` is not 
repackaged. The adapter class approach does not work for calls from jena-core 
to jena-arq without reflection.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/christopher-johnson/jena rename-core-system

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/jena/pull/401.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #401


commit d82328d905b0f8ae40f60ffe800728824975
Author: Christopher Hanna Johnson 
Date:   2018-04-15T21:24:12Z

 [JENA-1524] org.apache.jena.system is split by org.apache.jena.arq and 
org.apache.jena.core




---