Skip to main content
1-Visitor
August 25, 2020
Solved

Extension development - database thing template

  • August 25, 2020
  • 3 replies
  • 1475 views

Hello all,

I'm trying to create thing template based on database thing template in my custom extension. Using creator I've created thing template named MSSQLThingTemplate which is extending database thing template:

 

@ThingworxBaseTemplateDefinition(name = "Database")

public class MSSQLThingTemplate extends Thing {
	public MSSQLThingTemplate() {
		// TODO Auto-generated constructor stub
	}
}

 

The problem is that after creating thing template using this method i'm not able to add SQL Query or Command service to thing created from MSSQLThingTemplate, only Local (JavaScript) is visible. Do you know how to fix this? Should this thing template extend different class? Thanks in advance for help.

    Best answer by VladimirRosu_116627

    No, but if you're aiming to create a JDBC connector that allows you to access a database, there's another process that does not involve going into Java to do that (it's much more simpler).

    It is available here: http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FExtensibility%2Fjdbc_extension.html

    Would you be interested in that, or do you really need to process some code in Java and this is why you went the Java extension route?

    3 replies

    19-Tanzanite
    August 27, 2020

    No, but if you're aiming to create a JDBC connector that allows you to access a database, there's another process that does not involve going into Java to do that (it's much more simpler).

    It is available here: http://support.ptc.com/help/thingworx_hc/thingworx_8_hc/en/#page/ThingWorx%2FHelp%2FExtensibility%2Fjdbc_extension.html

    Would you be interested in that, or do you really need to process some code in Java and this is why you went the Java extension route?

    Community Manager
    September 14, 2020

    Hi @KG_9261951.

     

    If the previous response allowed you to find a solution, please mark it as the Accepted Solution for the benefit of others with the same issue.

     

    Thank you for your participation in our community!

     

    Regards.

     

    --Sharon

    Community Manager
    September 21, 2020

    Hi @KG_9261951.

     

    I have marked the Accepted Solution for this post.  If you disagree that it is the solution, please let me know.

     

    Thank you for your participation in our community!

     

    Regards.

     

    --Sharon